Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return ticks.map((tick) => Numbro.format(tick, format, language, _rounding_fn))
}
doFormat(row: any, cell: any, value: any, columnDef: any, dataContext: any): string {
const {format, language} = this
const rounding = (() => {
switch (this.rounding) {
case "round": case "nearest": return Math.round
case "floor": case "rounddown": return Math.floor
case "ceil": case "roundup": return Math.ceil
}
})()
value = Numbro.format(value, format, language, rounding)
return super.doFormat(row, cell, value, columnDef, dataContext)
}
}
numeral: (value: string | number, format: string, _special_vars: Vars) => Numbro.format(value, format),
datetime: (value: unknown, format: string, _special_vars: Vars) => tz(value, format),
protected _formatter(value: number, format: string): string {
return numbro.format(value, format)
}
}
protected _formatter(value: number, format: string): string {
return numbro.format(value, format)
}
}
protected _formatter(value: number, format: string): string {
return numbro.format(value, format)
}
}
protected _formatter(value: number, format: string): string {
return numbro.format(value, format)
}
}
doFormat(row: any, cell: any, value: any, columnDef: any, dataContext: any): string {
const {format, language} = this
const rounding = (() => { switch (this.rounding) {
case "round": case "nearest": return Math.round
case "floor": case "rounddown": return Math.floor
case "ceil": case "roundup": return Math.ceil
} })()
value = Numbro.format(value, format, language, rounding)
return super.doFormat(row, cell, value, columnDef, dataContext)
}
}