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

Function CreateSymbol

test/name.cc:79–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79Value CreateSymbol(const CallbackInfo& info) {
80 Value description = info[0];
81
82 if (!description.IsUndefined()) {
83 return Symbol::New(info.Env(), description.As<String>());
84 } else {
85 return Symbol::New(info.Env());
86 }
87}
88
89Value CreateSymbolFromStringView(const CallbackInfo& info) {
90 return Symbol::New(info.Env(), std::string_view("hello2"));

Callers

nothing calls this directly

Calls 1

EnvMethod · 0.80

Tested by

no test coverage detected