Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es-abstract/helpers/getInferredName.js')
-rw-r--r--node_modules/es-abstract/helpers/getInferredName.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/node_modules/es-abstract/helpers/getInferredName.js b/node_modules/es-abstract/helpers/getInferredName.js
new file mode 100644
index 000000000..2dab6e77b
--- /dev/null
+++ b/node_modules/es-abstract/helpers/getInferredName.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var getInferredName;
+try {
+ // eslint-disable-next-line no-new-func
+ getInferredName = Function('s', 'return { [s]() {} }[s].name;');
+} catch (e) {}
+
+var inferred = function () {};
+module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null;