lib/util: remove _.chain

This commit is contained in:
Liam Fitzgerald 2020-10-29 09:21:54 +10:00
parent 358af000ec
commit e86a870868

View File

@ -298,11 +298,12 @@ export function scrollIsAtBottom(container) {
* Formats a numbers as a `@ud` inserting dot where needed
*/
export function numToUd(num) {
return _.chain(num.toString())
.split('')
.reverse()
.chunk(3)
.reverse()
.map(s => s.join('')).join('.')
.value();
return f.flow(
f.split(''),
f.reverse,
f.chunk(3),
f.reverse,
f.map(s => s.join('')),
f.join('.')
)(num.toString())
}