Proposal: Boolean.parseBoolean

Dmitry Soshnikov dmitry.soshnikov at
Sat Mar 18 16:59:40 UTC 2017

On Fri, Mar 17, 2017 at 7:42 AM Augusto Moura <augusto.borgesm at>

> What would be the result for `Boolean.parseBoolean('undefined')` and
> `Boolean.parseBoolean('null')`?

Perhaps this should be restricted to JSON-compatible "false" only. Other
possible may include "", and "0". For stricter handling "null",
"undefined", and similar strings may even throw as non-Boolean parseable.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list