getInferredName.js 287 B

12345678910
  1. 'use strict';
  2. var getInferredName;
  3. try {
  4. // eslint-disable-next-line no-new-func
  5. getInferredName = Function('s', 'return { [s]() {} }[s].name;');
  6. } catch (e) {}
  7. var inferred = function () {};
  8. module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null;