feat(napi): impl get_value for Boolean

This commit is contained in:
LongYinan 2020-05-01 23:52:01 +08:00
parent c1da4f8d8e
commit 57b319273c
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -780,6 +780,12 @@ fn get_raw_type(env: sys::napi_env, raw_value: sys::napi_value) -> sys::napi_val
}
}
impl<'env> Value<'env, Boolean> {
pub fn get_value(&self) -> bool {
self.value.value
}
}
impl<'env> Value<'env, JsString> {
pub fn len(&self) -> Result<usize> {
let mut raw_length = ptr::null_mut();