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

Function main

benchmark/util/deprecate.js:18–36  ·  view source on GitHub ↗
({ n, modifyPrototype, emitWarningSync })

Source from the content-addressed store, hash-verified

16}
17
18function main({ n, modifyPrototype, emitWarningSync }) {
19 const { deprecate } = require('internal/util');
20
21 const fn = deprecate(
22 simpleFunction,
23 'This function is deprecated',
24 'DEP0000',
25 emitWarningSync,
26 modifyPrototype,
27 );
28
29 let sum = 0;
30 bench.start();
31 for (let i = 0; i < n; ++i) {
32 sum += fn(i);
33 }
34 bench.end(n);
35 assert.ok(sum);
36}

Callers

nothing calls this directly

Calls 6

requireFunction · 0.50
deprecateFunction · 0.50
fnFunction · 0.50
startMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…