add binding for reverse

This commit is contained in:
Matt Long
2018-06-20 18:00:58 -04:00
parent 4611d7bdba
commit d705cd8bbf
2 changed files with 37 additions and 0 deletions

View File

@ -151,4 +151,11 @@ extern {
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
#[wasm_bindgen(method)]
pub fn push(this: &Array, value: JsValue) -> u32;
/// The reverse() method reverses an array in place.
/// The first array element becomes the last, and the last array element becomes the first.
///
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse
#[wasm_bindgen(method)]
pub fn reverse(this: &Array) -> Array;
}