summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/is-builtin-module/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/is-builtin-module/index.js')
-rw-r--r--deps/npm/node_modules/is-builtin-module/index.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/npm/node_modules/is-builtin-module/index.js b/deps/npm/node_modules/is-builtin-module/index.js
new file mode 100644
index 0000000000..b6cfa616ae
--- /dev/null
+++ b/deps/npm/node_modules/is-builtin-module/index.js
@@ -0,0 +1,10 @@
+'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;
+};