setup-cpp/packages/untildify-user
Amin Yahyaabadi 1a3ed1a856
fix: require ~ in untildifyUser
2024-01-22 16:25:47 -08:00
..
src fix: require ~ in untildifyUser 2024-01-22 16:25:47 -08:00
README.md fix: require ~ in untildifyUser 2024-01-22 16:25:47 -08:00
package.json fix: require ~ in untildifyUser 2024-01-22 16:25:47 -08:00
tsconfig.json feat: add untildify-user package 2022-08-07 20:04:59 -07:00

README.md

untildify-user

Version License: Apache--2.0

Untildify a path for the current user even if it is root

Install

npm install --save untildify-user

Usage

userHomeDir (function)

returns: string

untildifyUser (function)

Replaces a tilde with the user's home directory

Parameters:

  • path (string) - The path to untildify

returns: string

UntildifyUser("~/foo") // /home/user/foo

🤝 Contributing

You can sponsor my work here:

https://github.com/sponsors/aminya

Pull requests, issues and feature requests are welcome. See the Contributing guide.