]> Cypherpunks repositories - gostls13.git/commit
syscall/js: add the Value.Truthy method
authorLarry Clapp <larry@theclapp.org>
Fri, 26 Oct 2018 01:32:27 +0000 (01:32 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 Oct 2018 15:12:07 +0000 (15:12 +0000)
commitb0321a604315d272f2f0d26d771ff7ceddfdbdec
tree2381162cadf2dc6fe0bf0163ecbe50ead1592d61
parent64967ffe6d7e8a82c87db7c11f76117072e7aff7
syscall/js: add the Value.Truthy method

Truthy returns the JavaScript "truthiness" of the given value.  In
JavaScript, false, 0, "", null, undefined, and NaN are "falsy", and
everything else is "truthy".

Fixes #28264

Change-Id: I4586f98646c05a4147d06a7c4a5d9c61d956fc83
GitHub-Last-Rev: 649b353ebc23b09d840faf927a2eeca41ee164bf
GitHub-Pull-Request: golang/go#28358
Reviewed-on: https://go-review.googlesource.com/c/144384
Reviewed-by: Richard Musiol <neelance@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/js/js.go
src/syscall/js/js_test.go