inspect-source.js 465 B

1234567891011121314
  1. var uncurryThis = require('../internals/function-uncurry-this');
  2. var isCallable = require('../internals/is-callable');
  3. var store = require('../internals/shared-store');
  4. var functionToString = uncurryThis(Function.toString);
  5. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  6. if (!isCallable(store.inspectSource)) {
  7. store.inspectSource = function (it) {
  8. return functionToString(it);
  9. };
  10. }
  11. module.exports = store.inspectSource;