summaryrefslogtreecommitdiff
path: root/node_modules/webpack-sources/lib/helpers/getName.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/webpack-sources/lib/helpers/getName.js')
-rw-r--r--node_modules/webpack-sources/lib/helpers/getName.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/webpack-sources/lib/helpers/getName.js b/node_modules/webpack-sources/lib/helpers/getName.js
new file mode 100644
index 00000000..db6a863a
--- /dev/null
+++ b/node_modules/webpack-sources/lib/helpers/getName.js
@@ -0,0 +1,14 @@
+/*
+ MIT License http://www.opensource.org/licenses/mit-license.php
+ Author Tobias Koppers @sokra
+*/
+
+"use strict";
+
+const getName = (sourceMap, index) => {
+ if (index < 0) return null;
+ const { names } = sourceMap;
+ return names[index];
+};
+
+module.exports = getName;