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

Function toDigits

packages/shared/src/components/fields/CodeField.tsx:19–20  ·  view source on GitHub ↗
(value: string, length: number)

Source from the content-addressed store, hash-verified

17const DEFAULT_LENGTH = 6;
18
19const toDigits = (value: string, length: number): string =>
20 value.replace(/\D/g, '').slice(0, length);
21
22export function CodeField({
23 disabled,

Callers 2

CodeFieldFunction · 0.85
onInputChangeFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected