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

Function removeNonNumber

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

Source from the content-addressed store, hash-verified

31};
32
33export const removeNonNumber = (value: string): string =>
34 value.replace(/,(\d{2})$/, '.$1').replace(/[^\d.]/g, '');
35
36export const getPrice = (item: PaddleProductLineItem): number => {
37 const priceAmount = parseFloat(item.totals.total);

Callers 2

getPriceFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected