MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / child

Function child

test/maybe/index.js:36–50  ·  view source on GitHub ↗
(binding)

Source from the content-addressed store, hash-verified

34}
35
36function child (binding) {
37 const MAGIC_NUMBER = 12459062;
38 binding.normalJsCallback(() => {
39 return MAGIC_NUMBER;
40 }, MAGIC_NUMBER);
41
42 binding.testMaybeOverloadOp(
43 () => { return MAGIC_NUMBER; },
44 () => { throw Error('Foobar'); }
45 );
46
47 binding.voidCallback(() => {
48 throw new Error('foobar');
49 });
50}

Callers 1

testFunction · 0.70

Calls 1

ErrorClass · 0.85

Tested by 1

testFunction · 0.56