Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

getInferredName.js 287 B

3 lat temu
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;