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