https://github.com/winkgroup/misc
Utility library used in WiNK for miscellaneous tasks
https://github.com/winkgroup/misc
Last synced: 4 months ago
JSON representation
Utility library used in WiNK for miscellaneous tasks
- Host: GitHub
- URL: https://github.com/winkgroup/misc
- Owner: WINKgroup
- License: mit
- Created: 2022-07-12T07:14:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-09T10:23:23.000Z (5 months ago)
- Last Synced: 2025-03-10T21:23:26.415Z (4 months ago)
- Language: TypeScript
- Size: 55.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# misc
Utility library used in WiNK for miscellaneous tasks## functions
- **timeFromNow**: english text like "30 minutes ago", etc...
- **shrinkUrl**: http://veryloooooooooongurl => http://sh...rturl
- **byteString**: 123456789 => 123.5Mb
- **padZeros**: padZeros(50, 3) => "050"
- **collapse**: looooooong text => lo...xt
- **pickRandom**: ["1", "4", "8"] => "4" (random)
- **camelToTitle**: dontTryThisAtHome => Dont Try This At Home## extra functions available only on NodeJS (server side)
- **readline(question:string)**: to provide a question on the cli
- **getKeypress() => Promise**: to read a key pressing in the cli