napi_create_symbol
functionv1js_native_api.hThis API creates a JavaScript symbol value from a UTF8-encoded C string.
napi_status napi_create_symbol(napi_env env,
napi_value description,
napi_value* result)
[in] env: The environment that the API is invoked under.[in] description: Optionalnapi_valuewhich refers to a JavaScriptstringto be set as the description for the symbol.[out] result: Anapi_valuerepresenting a JavaScriptsymbol.
Returns napi_ok if the API succeeded.
This API creates a JavaScript symbol value from a UTF8-encoded C string.
The JavaScript symbol type is described in Section symbol type
of the ECMAScript Language Specification.