UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

16 lines (11 loc) 317 B
'use strict'; const path = require('path'); const nextPath = (from, to) => { const diff = path.relative(from, to); const sepIndex = diff.indexOf(path.sep); const next = sepIndex >= 0 ? diff.substring(0, sepIndex) : diff; return path.join(from, next); }; module.exports = nextPath;