Add array.entries()

This commit is contained in:
Andrew Morris
2023-05-30 09:34:05 +10:00
parent 4570aac6e8
commit c79e40a1dd
5 changed files with 149 additions and 18 deletions

View File

@@ -661,11 +661,9 @@ static VALUE_OF: NativeFunction = native_fn(|this, _params| {
})
});
static VALUES: NativeFunction = native_fn(|this, _params| {
Ok(match this.get() {
Val::String(string_data) => StringIterator::new(string_data.clone()).to_dynamic_val(),
_ => return Err("string indirection".to_error()),
})
static VALUES: NativeFunction = native_fn(|this, _params| match this.get() {
Val::String(string_data) => Ok(StringIterator::new(string_data.clone()).to_dynamic_val()),
_ => Err("string indirection".to_error()),
});
/**