MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / joinedDuring

Function joinedDuring

__tests__/js-resolution-work.test.ts:97–111  ·  view source on GitHub ↗

How many characters arrays were joined into while `run` ran.

(run: () => void)

Source from the content-addressed store, hash-verified

95describe('a receiver read back from a minified line', () => {
96 /** How many characters arrays were joined into while `run` ran. */
97 function joinedDuring(run: () => void): number {
98 const join = Array.prototype.join;
99 let chars = 0;
100 Array.prototype.join = function (this: unknown[], separator?: string): string {
101 const text = join.call(this, separator);
102 chars += text.length;
103 return text;
104 };
105 try {
106 run();
107 } finally {
108 Array.prototype.join = join;
109 }
110 return chars;
111 }
112
113 /**
114 * Runs `refs` through the check for a call written on `window.App…`, which

Callers 1

readBackFunction · 0.85

Calls 2

callMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected