3.0.0 • Published 5 years ago
root-link-target v3.0.0
root-link-target
Gets the shortest directory to which a file can be linked
Installation
<npm|yarn|pnpm> add root-link-targetUsage
const rootLinkTarget = require('root-link-target')
rootLinkTarget.sync('C:\\sub\\dir\\foo.txt')
//> C:\\API
rootLinkTarget.sync(filename): string
Returns the shortest directory to which filename can be linked