index.js 225 B

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