mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 17:51:33 +00:00
add bindings for unshift
This commit is contained in:
@ -165,4 +165,10 @@ extern {
|
||||
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn shift(this: &Array) -> JsValue;
|
||||
|
||||
/// The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
|
||||
///
|
||||
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn unshift(this: &Array, value: JsValue) -> u32;
|
||||
}
|
Reference in New Issue
Block a user