| 114 | // native class. Each native class is identified by a unique type tag, which |
| 115 | // gets applied to each of its instances upon construction. |
| 116 | template <typename T> inline bool IsInstanceOf(Napi::Env env, Napi::Value value) { |
| 117 | bool result = false; |
| 118 | napi_status status = napi_check_object_type_tag(env, value.As<Napi::Object>(), &T::TYPE_TAG, &result); |
| 119 | return status == napi_ok && result; |
| 120 | } |
| 121 | |
| 122 | // Wraps a native method so that it can only be invoked on a receiver that is |
| 123 | // backed by the expected native class. Node-API has no equivalent of |
nothing calls this directly
no outgoing calls
no test coverage detected