3.0.0 • Published 3 years ago

root-link-target v3.0.0

Weekly downloads
1,148
License
MIT
Repository
github
Last release
3 years ago

root-link-target

Gets the shortest directory to which a file can be linked

npm version

Installation

<npm|yarn|pnpm> add root-link-target

Usage

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

rootLinkTarget(filename): Promise<string>

License

MIT © Zoltan Kochan

3.1.0

3 years ago

3.0.0

3 years ago

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago