Proposal: Boolean.parseBoolean

Dmitry Soshnikov dmitry.soshnikov at gmail.com
Thu Mar 16 21:12:38 UTC 2017


On Thu, Mar 16, 2017 at 2:03 PM, Ben Newman <benjamin at cs.stanford.edu>
wrote:

> Just to check my understanding, would
>
>   Boolean.parseBoolean = function (value) {
>     return !! (value && JSON.parse(String(value)));
>   };
>
> be a reasonable polyfill for your proposed function?
>
>
Yep, this looks good.

Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170316/20d4057d/attachment.html>


More information about the es-discuss mailing list