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

Function isStringValid

src/validators/required.ts:14–15  ·  view source on GitHub ↗
(value: string, trim: boolean)

Source from the content-addressed store, hash-verified

12const DEFAULT_PARAMS: RequiredArgs = { trim: true };
13
14const isStringValid = (value: string, trim: boolean): boolean =>
15 trim ? value.trim().length > 0 : value.length > 0;
16
17const isNonStringValid = (value: any): boolean =>
18 value !== void 0 && value !== null;

Callers 1

isValidFieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…