1
0
Fork 0

chore(lab): Fixed issues with next build

This commit is contained in:
joostdecock 2023-05-19 09:22:11 +02:00
parent 8df1276430
commit 7c8b59b781
9 changed files with 99 additions and 33 deletions

View file

@ -4,6 +4,10 @@ import set from 'lodash.set'
import orderBy from 'lodash.orderby'
import unset from 'lodash.unset'
// Method that returns a unique ID when all you need is an ID
// but you can't be certain you have one
export const getId = (id) => (id ? id : Date.now())
// Generic rounding method
export const round = (val, decimals = 1) =>
Math.round(val * Math.pow(10, decimals)) / Math.pow(10, decimals)