test/node_modules/is-builtin-module/index.js
2018-12-13 14:35:49 +01:00

10 lines
225 B
JavaScript

'use strict';
var builtinModules = require('builtin-modules');
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return builtinModules.indexOf(str) !== -1;
};