Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
17
const DEFAULT_LENGTH = 6;
18
19
const toDigits = (value: string, length: number): string =>
20
value.replace(/\D/g,
''
).slice(0, length);
21
22
export function CodeField({
23
disabled,
Callers
2
CodeField
Function · 0.85
onInputChange
Function · 0.85
Calls
1
replace
Method · 0.80
Tested by
no test coverage detected