@splash-cli/path-fixer

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @splash-cli/path-fixer

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

114 kB

Total Files

9

Last publish

Collaborators

  • rawnly