UNPKG

spinjs

Version:

[![Join the chat at https://gitter.im/sysgears/spinjs](https://badges.gitter.im/sysgears/spinjs.svg)](https://gitter.im/sysgears/spinjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://badge.fury.io/js/spi

18 lines 584 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = require("path"); exports.default = (function (rootPath, relPath) { if (relPath === void 0) { relPath = '.'; } var paths = []; var curDir = rootPath; while (true) { var lastIdx = curDir.lastIndexOf(path.sep, curDir.length - 1); paths.push(path.join(curDir + (lastIdx < 0 ? path.sep : ''), relPath)); if (lastIdx < 0) { break; } curDir = curDir.substring(0, lastIdx); } return paths; }); //# sourceMappingURL=upDirs.js.map