Proposal: Boolean.parseBoolean

T.J. Crowder tj.crowder at farsightsoftware.com
Mon Mar 20 18:57:56 UTC 2017


Any reason for not just using `Boolean.parse`? (Rather than repeating
`Boolean` in the function name?)

-- T.J. Crowder


On Mon, Mar 20, 2017 at 6:54 PM, Dmitry Soshnikov <
dmitry.soshnikov at gmail.com> wrote:

> On Thu, Mar 16, 2017 at 1:55 PM, Dmitry Soshnikov <
> dmitry.soshnikov at gmail.com> wrote:
>
>> Similar to `Number.parseInt`, the `Boolean.parseBooelan` might be useful
>> for "boolean strings" retrieved from some string-based storages, which do
>> not support other types at serialization.
>>
>> ```
>> Boolean.parseBoolean('true'); // true
>> Boolean.parseBoolean('false'); // false
>> ```
>>
>>
> OK, here the actual proposed spec for it: https://gist.github.com/
> DmitrySoshnikov/5ee1a7d51d8dbe159ae917876b27f36a
>
> I made it plain simple (anything which is not case-insensitive `"true"` is
> `false`), and copy-pasted from Java.
>
> Dmitry
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170320/1a54dd02/attachment.html>


More information about the es-discuss mailing list