MCPcopy Create free account
hub / github.com/krausest/js-framework-benchmark / pick

Function pick

frameworks/keyed/uhtml/src/utils.js:8–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7const { round, random } = Math;
8const pick = list => list[round(random() * 1000) % list.length];
9const label = () => `${pick(adjectives)} ${pick(colours)} ${pick(nouns)}`;
10
11let TR, ID = 1, SEL = 0, SIZE = 0, DATA = [];

Callers 1

labelFunction · 0.70

Calls 1

randomFunction · 0.50

Tested by

no test coverage detected