UNPKG

light-ning

Version:

(ALPHA) framework without dependecies...

20 lines (17 loc) 389 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * * @example cd ../../ * @param dir {string} * @param step {number} * @returns {string} * @copyright Sentiurin Vladimir 2017 */ exports.default = function (dir, step) { var constructPath = dir.split('/'); constructPath.splice(constructPath.length - step); return constructPath.join('/'); };