core.js 460 B

1234567891011121314
  1. 'use strict';
  2. var isCoreModule = require('is-core-module');
  3. var path = require('path');
  4. var fs = require('fs');
  5. var data = JSON.parse(String(fs.readFileSync(path.join(path.dirname(require.resolve('is-core-module/package.json')), 'core.json'))));
  6. var core = {};
  7. for (var mod in data) { // eslint-disable-line no-restricted-syntax
  8. if (Object.prototype.hasOwnProperty.call(data, mod)) {
  9. core[mod] = isCoreModule(mod);
  10. }
  11. }
  12. module.exports = core;