https://github.com/plotdb/pthk
path kit
https://github.com/plotdb/pthk
Last synced: about 1 month ago
JSON representation
path kit
- Host: GitHub
- URL: https://github.com/plotdb/pthk
- Owner: plotdb
- Created: 2022-11-01T03:11:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T03:28:56.000Z (over 3 years ago)
- Last Synced: 2025-02-26T08:35:17.092Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pthk
path kit. simply a nodejs `path` module with additional method:
- `rectify(name)`: for a given relative path `name`:
- return a trimmed path with special characters removed and relative paths such as `..` normalized.
- always return a relative path instead of absolute path beginned with `/`.
## Reference
- `node-sanitize-filename`: https://github.com/parshap/node-sanitize-filename
## License
MIT