find-node-modules
Version:
Return an array of all parent node_modules directories
15 lines (14 loc) • 403 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
/**
* Designed to work only with simple paths: `dir\\file`.
*/
function unixify(filepath) {
return filepath.replace(/\\/g, '/');
}
exports.unixify = unixify;
function makeAbsolute(cwd, filepath) {
return path.resolve(cwd, filepath);
}
exports.makeAbsolute = makeAbsolute;