mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 13:01:22 +00:00
Add binding for Object.entries()
This commit is contained in:
@ -2014,6 +2014,16 @@ extern "C" {
|
||||
#[wasm_bindgen(static_method_of = Object, js_name = defineProperties)]
|
||||
pub fn define_properties(obj: &Object, props: &Object) -> Object;
|
||||
|
||||
/// The Object.entries() method returns an array of a given
|
||||
/// object's own enumerable property [key, value] pairs, in the
|
||||
/// same order as that provided by a for...in loop (the difference
|
||||
/// being that a for-in loop enumerates properties in the
|
||||
/// prototype chain as well).
|
||||
///
|
||||
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)
|
||||
#[wasm_bindgen(static_method_of = Object)]
|
||||
pub fn entries(object: &Object) -> Array;
|
||||
|
||||
/// The `Object.freeze()` method freezes an object: that is, prevents new
|
||||
/// properties from being added to it; prevents existing properties from
|
||||
/// being removed; and prevents existing properties, or their enumerability,
|
||||
|
Reference in New Issue
Block a user