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

Function CreateDate

test/date.cc:8–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace {
7
8Value CreateDate(const CallbackInfo& info) {
9 double input = info[0].As<Number>().DoubleValue();
10
11 return Date::New(info.Env(), input);
12}
13
14Value CreateDateFromTimePoint(const CallbackInfo& info) {
15 auto input = std::chrono::system_clock::time_point{};

Callers 1

testFunction · 0.85

Calls 1

EnvMethod · 0.80

Tested by 1

testFunction · 0.68