UNPKG

find-node-modules

Version:

Return an array of all parent node_modules directories

15 lines (11 loc) 338 B
var is = {}; ['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'].forEach(function (name) { is[name] = function (obj) { return Object.prototype.toString.call(obj) === '[object ' + name + ']' } }) is.Object = function (obj) { /* eslint no-new-object: "off" */ return obj === new Object(obj) } module.exports = is