mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-29 04:31:33 +00:00
Add Number.isNaN() binding (#532)
This commit is contained in:
committed by
Alex Crichton
parent
c174262cf0
commit
b7acb0785d
@ -1263,6 +1263,13 @@ extern "C" {
|
||||
#[wasm_bindgen(static_method_of = Number, js_name = isInteger)]
|
||||
pub fn is_integer(value: &JsValue) -> bool;
|
||||
|
||||
/// The Number.isNaN() method determines whether the passed value is NaN and its type is Number.
|
||||
/// It is a more robust version of the original, global isNaN().
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
|
||||
#[wasm_bindgen(static_method_of = Number, js_name = isNaN)]
|
||||
pub fn is_nan(value: &JsValue) -> bool;
|
||||
|
||||
/// The Number.isSafeInteger() method determines whether the provided value is a number
|
||||
/// that is a safe integer.
|
||||
///
|
||||
|
Reference in New Issue
Block a user