MCPcopy Create free account
hub / github.com/Lemoncode/fonk / isLengthValid

Function isLengthValid

src/validators/length.ts:18–25  ·  view source on GitHub ↗
(
  value: any,
  length: number,
  validatorFn: (value: string, length: number) => boolean
)

Source from the content-addressed store, hash-verified

16}
17
18export function isLengthValid(
19 value: any,
20 length: number,
21 validatorFn: (value: string, length: number) => boolean
22): boolean {
23 // Don't try to validate non string values
24 return typeof value === 'string' ? validatorFn(value, length) : true;
25}

Callers 2

validatorFunction · 0.90
validatorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…