https://github.com/imjuni/my-node-fp
https://github.com/imjuni/my-node-fp
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/imjuni/my-node-fp
- Owner: imjuni
- License: mit
- Created: 2022-03-23T03:36:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T07:50:56.000Z (over 2 years ago)
- Last Synced: 2025-07-29T06:34:04.438Z (11 months ago)
- Language: TypeScript
- Size: 1.37 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple node programming utility

[](https://npmcharts.com/compare/my-node-fp?minimal=true)
[](https://github.com/imjuni/my-node-fp)
[](https://github.com/imjuni/my-node-fp/issues)
[](https://www.npmjs.com/package/my-node-fp)
[](https://github.com/imjuni/my-node-fp/blob/master/LICENSE)
[](https://github.com/prettier/prettier)
Simple utility functions that can use node.
## Function list
### fs
| name | description |
| - | - |
| exists | check file or directory exist, return boolean. exactly same depreciated fs.promise.exists funciton |
| existsSync | check file or directory exist, return boolean. exactly same depreciated fs.existsSync funciton |
| getDirname | get directory name. If targetPath is already directory return targetPath(not parent directory) |
| getDirnameSync | get directory name. If targetPath is already directory return targetPath(not parent directory) |
| isDirectory | if targetPath is directory, return true |
| isDirectorySync | if targetPath is directory, return true |
| isEmptyDir | check directory is empty |
| isEmptyDirSync | check directory is empty |
| isDescendant | check target directory is descendant of parent directory |
### path
| name | description |
| - | - |
| basenames | Return the last portion of a path, suffix can be string, string[] |
| replaceSepToPosix | change sep to posix.sep |
| replaceSepToWin32 | change sep to win32.sep |
| win32DriveLetterUpdown | change win32 drive letter (ex> c:) to upper or lower |
| startSepAppend | starts sep(or you can pass sep character) append if not start sep |
| endSepAppend | ends sep(or you can pass sep character) append if not end sep |
| startSepRemove | starts sep(or you can pass sep character) remove if start sep |
| endSepRemove | ends sep(or you can pass sep character) remove if end sep |