1.0.2 • Published 6 years ago

@splash-cli/path-fixer v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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