Napi::Value
上面的value就是 Node-API 中的原生值,它可以是:
C++ bool 类型,对应Napi::Boolean
C++ 整型和浮点数,对应Napi:Number
C++ 字符型常量指针const char*,需要 UTF-8 编码并且以 null 结尾,对应Napi::String
const char16_t*,UTF-16-LE 编码且以 null 结尾,对应Napi::String
std::string or std::u16string,对应Napi::String
Napi::Value or napi_value,对应Napi::Value
https://barwe.cc/2022/08/29/napi-value-and-its-subclasses