UNPKG

find-node-modules

Version:

Return an array of all parent node_modules directories

13 lines (9 loc) 340 B
"use strict"; var o = Object.prototype; function getClass(value) { // Returns the internal [[Class]] by calling Object.prototype.toString // with the provided value as this. Return value is a string, naming the // internal class, e.g. "Array" return o.toString.call(value).split(/[ \]]/)[1]; } module.exports = getClass;