MCPcopy Create free account
hub / github.com/apitable/apitable / strip

Function strip

packages/core/src/utils/number.ts:251–253  ·  view source on GitHub ↗
(num: number, precision = 15)

Source from the content-addressed store, hash-verified

249
250// fix wrong data
251export function strip(num: number, precision = 15): number {
252 return parseFloat(Number(num).toPrecision(precision));
253}
254
255// get the number of digits after the decimal point
256export function digitLength(num: number): number {

Callers 2

float2FixedFunction · 0.85
divideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected