MCPcopy Create free account
hub / github.com/effect-app/libs / StringIdArb

Function StringIdArb

packages/effect-app/src/Schema/moreStrings.ts:180–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178const makeStringId = (s?: string): StringId =>
179 s !== undefined ? S.decodeSync(StringIdSchemaBase)(s) : nanoid() as unknown as StringId
180const StringIdArb = (): S.Arbitrary<StringId> => (fc) =>
181 fc
182 .uint8Array({ minLength: length, maxLength: length })
183 .map((_) => customRandom(urlAlphabet, size, (size) => _.subarray(0, size))() as StringId)
184/**
185 * A string that is at least 6 characters long and a maximum of 50.
186 *

Callers 2

moreStrings.tsFile · 0.85
arbFunction · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…