MCPcopy Create free account
hub / github.com/hashintel/hash / pick

Function pick

apps/hash-api/src/seed-data/seed-crm-data.ts:162–162  ·  view source on GitHub ↗
(arr: readonly T[])

Source from the content-addressed store, hash-verified

160
161const randInt = (min: number, max: number) => faker.number.int({ min, max });
162const pick = <T>(arr: readonly T[]): T => faker.helpers.arrayElement(arr);
163/** Picks `min`–`max` distinct elements from `arr`. */
164const pickSome = <T>(arr: readonly T[], min: number, max: number): T[] =>
165 faker.helpers.arrayElements(arr, {

Callers 6

seedCrmDataFunction · 0.70
accountPropsFunction · 0.70
productLineItemFunction · 0.70
dealPropsFunction · 0.70
relatedToTargetFunction · 0.70
activitySubtypePropsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected