Skip to content
/ misc Public

Utility library used in WiNK for miscellaneous tasks

License

Notifications You must be signed in to change notification settings

WINKgroup/misc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Utility library used in WiNK for miscellaneous tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published