Skip to content

Tiny wrapper around timestring (parser for human-readable durations) that fails loudly if you accidentially use a thousand separator.

Notifications You must be signed in to change notification settings

mk-pmb/timestring-notsep-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

timestring-notsep

Tiny wrapper around timestring (parser for human-readable durations) that fails loudly if you accidentially use a thousand separator.

Use timestring more robustly: Some countries use , and . swapped, with dot as their thousand separator and comma for the fractional part.

To avoid config accidents, this module enforces the use of dot for the fractional part and no thousand separators. It can't help with inherently ambiguous cases like 1.234, but at least it prevents some obvious mistakes like 1,25 being parsed as 125.

 

License

ISC

About

Tiny wrapper around timestring (parser for human-readable durations) that fails loudly if you accidentially use a thousand separator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published