MCPcopy Index your code
hub / github.com/nodejs/node / makeAsciiString

Function makeAsciiString

benchmark/zlib/crc32.js:24–29  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

22}
23
24function makeAsciiString(size) {
25 const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
26 let out = '';
27 for (let i = 0, j = 0; i < size; i++, j = (j + 7) % chars.length) out += chars[j];
28 return out;
29}
30
31function main({ type, len, n }) {
32 // Scale iterations so that total processed bytes roughly constant around n*4096 bytes.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected