MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / InternalizedFromUtf8

Function InternalizedFromUtf8

src/util/helpers.cpp:10–12  ·  view source on GitHub ↗

Node-API has no equivalent of V8's internalized strings, so these are simple aliases of StringFromUtf8; the names are kept to preserve the intent of call sites (strings that are used repeatedly as property keys). If Node-API ever gains this functionality, we can easily restore it here.

Source from the content-addressed store, hash-verified

8// sites (strings that are used repeatedly as property keys). If Node-API ever
9// gains this functionality, we can easily restore it here.
10inline Napi::String InternalizedFromUtf8(Napi::Env env, const char* data, int length) {
11 return StringFromUtf8(env, data, length);
12}
13
14inline Napi::Value InternalizedFromUtf8OrNull(Napi::Env env, const char* data, int length) {
15 if (data == NULL) return env.Null();

Callers 4

GetRowJSMethod · 0.85
GetExpandedRowJSFunction · 0.85
PairMethod · 0.85

Calls 1

StringFromUtf8Function · 0.85

Tested by

no test coverage detected