MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / IsPromise

Function IsPromise

test/promise.cc:6–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace Napi;
5
6Value IsPromise(const CallbackInfo& info) {
7 return Boolean::New(info.Env(), info[0].IsPromise());
8}
9
10Value ResolvePromise(const CallbackInfo& info) {
11 auto deferred = Promise::Deferred::New(info.Env());

Callers 1

napi-inl.hFile · 0.50

Calls 1

EnvMethod · 0.80

Tested by

no test coverage detected