One step closer to your destination.
npm install next-path> One step closer to your destination.
Like an incremental path.relative().
- Walk the file system without messy state.
- Works well with functional programming styles.
- Flexible about user input.
``sh`
npm install next-path --save
Get it into your program.
`js`
const nextPath = require('next-path');
Determine the next path, one step closer to the destination.
`js`
console.log(nextPath('a', 'a/b/c')); // => 'a/b'
console.log(nextPath('../', '../../../')); // => '../..'
#### from
Type: string
The base path that both to and the result will be relative to.
#### to
Type: string
The path you want to move one step closer to.
See our contributing guidelines for more details.
1. Fork it.
2. Make a feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request.
Go make something, dang it.