0.0.3 • Published 5 years ago
relative.to v0.0.3
Description
Get relative path, based on current path.
This module could solve problems of how many ../
should I use.
Installation
npm install relative.to --save
or
yarn add relative.to
Usage
const relativeTo = require('relative.to');
const path = relativeTo('/root/a', '/root/b'); // b
API
relative(currentFile, distFile)
- currentFile: {String} currentFile path
- distFile: {String} target file that need to be calculated