MCPcopy
hub / github.com/jwngr/sdow / getNumberWithCommas

Function getNumberWithCommas

website/src/utils.ts:32–34  ·  view source on GitHub ↗
(val: number)

Source from the content-addressed store, hash-verified

30};
31
32export const getNumberWithCommas = (val: number): string => {
33 return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
34};
35
36export function assertNever(x: never): never {
37 throw new Error(`Unexpected object: ${x}`);

Callers 2

ResultsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected