@splash-cli/path-fixer
v1.0.2
Published
> Replace '~' with user home path.
Downloads
8
Readme
path-fixer
Replace '~' with user home path.
Install
$ npm install @splash-cli/path-fixer --save
#or
$ yarn add @splash-cli/path-fixer
Usage
import fixPath from '@splash-cli/path-fixer';
console.log(fixPath('~/Desktop')) //=> '/Users/<user>/Desktop'
Api
fixPath(path)
Returns parsed path.
path
Type: String
Path to be fixed
fixPath.promise(path)
Returns promise for parsed path.
path
Type: String
Path to be fixed
License
MIT © Federico Vitale