1.0.2 • Published 5 years ago

timestring-notsep v1.0.2

Weekly downloads
8
License
ISC
Repository
github
Last release
5 years ago

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