MCPcopy Create free account
hub / github.com/dailydotdev/apps / removeNonNumber

Function removeNonNumber

packages/shared/src/lib/numberFormat.ts:39–40  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

37};
38
39export const removeNonNumber = (value: string): string =>
40 value.replace(/,(\d{2})$/, '.$1').replace(/[^\d.]/g, '');
41
42export const getPrice = (item: PaddleProductLineItem): number => {
43 const priceAmount = parseFloat(item.totals.total);

Callers 2

getPriceFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected