0.5.1 • Published 3 years ago
@usesummit/utils v0.5.1
Summit JS Utils
Useful methods for handling numbers, mostly.
Came out of the need for re-using some helper methods across multiple codebases at Summit.
Contents
calculateHumanReadableNumberturns a number into a[number, abbreviation]tuple, so that you can pass thenumberto any number formatter and then add theabbreviationas a suffix. You can use this to pretty-print47965012.48to47.96MM. This doesn't handle rounding or fraction digits, use your regular number formatter for that (i.e.Intl.NumberFormat)parseHumanReadableNumbercan parse numbers like1.52MMand1,234,456.78to floatsgetIdentifiergenerates and stores a unique identifier so you can anonymously identify users or sessions
0.3.0
3 years ago
0.2.7
3 years ago
0.2.8
3 years ago
0.5.0
3 years ago
0.4.1
3 years ago
0.3.2
3 years ago
0.4.0
3 years ago
0.3.1
3 years ago
0.5.1
3 years ago
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago