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

Function IsLossless

test/bigint.cc:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace {
10
11Value IsLossless(const CallbackInfo& info) {
12 Env env = info.Env();
13
14 BigInt big = info[0].As<BigInt>();
15 bool is_signed = MaybeUnwrap(info[1].ToBoolean()).Value();
16
17 bool lossless;
18 if (is_signed) {
19 big.Int64Value(&lossless);
20 } else {
21 big.Uint64Value(&lossless);
22 }
23
24 return Boolean::New(env, lossless);
25}
26
27Value IsBigInt(const CallbackInfo& info) {
28 Env env = info.Env();

Callers 1

testFunction · 0.85

Calls 3

MaybeUnwrapFunction · 0.85
EnvMethod · 0.80
ValueMethod · 0.80

Tested by 1

testFunction · 0.68