mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 06:21:22 +00:00
Merge pull request #1638 from ThomasdenH/master
Add is_truthy, is_falsy
This commit is contained in:
@ -2464,6 +2464,11 @@ impl<'a> Context<'a> {
|
||||
format!("typeof({}) === 'string'", args[0])
|
||||
}
|
||||
|
||||
Intrinsic::IsFalsy => {
|
||||
assert_eq!(args.len(), 1);
|
||||
format!("!{}", args[0])
|
||||
}
|
||||
|
||||
Intrinsic::ObjectCloneRef => {
|
||||
assert_eq!(args.len(), 1);
|
||||
args[0].clone()
|
||||
|
Reference in New Issue
Block a user