diff options
Diffstat (limited to 'src/node_modules/es-abstract/helpers/getInferredName.js')
-rw-r--r-- | src/node_modules/es-abstract/helpers/getInferredName.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/node_modules/es-abstract/helpers/getInferredName.js b/src/node_modules/es-abstract/helpers/getInferredName.js new file mode 100644 index 0000000..2dab6e7 --- /dev/null +++ b/src/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; |