1. napi_status napi_set_named_property(napi_env env,
    2. napi_value object,
    3. const char* utf8Name,
    4. napi_value value);
    • [in] env: The environment that the N-API call is invoked under.
    • [in] object: The object on which to set the property.
    • [in] utf8Name: The name of the property to set.
    • [in] value: The property value.

    Returns napi_ok if the API succeeded.

    This method is equivalent to calling [napi_set_property][] with a napi_value created from the string passed in as utf8Name.