mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 14:01:25 +00:00
Define is_truthy in terms of is_falsy
This commit is contained in:
@ -85,9 +85,6 @@ intrinsics! {
|
||||
#[symbol = "__wbindgen_is_string"]
|
||||
#[signature = fn(ref_anyref()) -> Boolean]
|
||||
IsString,
|
||||
#[symbol = "__wbindgen_is_truthy"]
|
||||
#[signature = fn(ref_anyref()) -> Boolean]
|
||||
IsTruthy,
|
||||
#[symbol = "__wbindgen_is_falsy"]
|
||||
#[signature = fn(ref_anyref()) -> Boolean]
|
||||
IsFalsy,
|
||||
|
@ -2299,11 +2299,6 @@ impl<'a> Context<'a> {
|
||||
format!("typeof({}) === 'string'", args[0])
|
||||
}
|
||||
|
||||
Intrinsic::IsTruthy => {
|
||||
assert_eq!(args.len(), 1);
|
||||
format!("!!{}", args[0])
|
||||
}
|
||||
|
||||
Intrinsic::IsFalsy => {
|
||||
assert_eq!(args.len(), 1);
|
||||
format!("!{}", args[0])
|
||||
|
Reference in New Issue
Block a user