| 1 | inline Napi::String StringFromUtf8(Napi::Env env, const char* data, int length) { |
| 2 | if (length < 0) return Napi::String::New(env, data); |
| 3 | return Napi::String::New(env, data, length); |
| 4 | } |
| 5 | |
| 6 | // Node-API has no equivalent of V8's internalized strings, so these are simple |
| 7 | // aliases of StringFromUtf8; the names are kept to preserve the intent of call |
no outgoing calls
no test coverage detected