Skip to content

Commit

Permalink
[Refactor] deprecated lib/core.js now uses data from `is-core-modul…
Browse files Browse the repository at this point in the history
…e` also
  • Loading branch information
ljharb committed Apr 14, 2023
1 parent c2f9ce2 commit 122bb64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
'use strict';

var isCoreModule = require('is-core-module');
var data = require('./core.json');
var path = require('path');
var fs = require('fs');
var data = JSON.parse(String(fs.readFileSync(path.join(path.dirname(require.resolve('is-core-module/package.json')), 'core.json'))));

var core = {};
for (var mod in data) { // eslint-disable-line no-restricted-syntax
Expand Down

0 comments on commit 122bb64

Please sign in to comment.