Ramda: Suggestion: toBoolean function

Created on 11 Apr 2019  路  1Comment  路  Source: ramda/ramda

a useful function is to convert a value to boolean,
something like this:

const toBool = x => not(not(x))

Most helpful comment

JavaScript already has the Boolean constructor which does what you're looking for: Boolean(x)

>All comments

JavaScript already has the Boolean constructor which does what you're looking for: Boolean(x)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhaoyao91 picture zhaoyao91  路  3Comments

DanielTimLee picture DanielTimLee  路  3Comments

cjohansen picture cjohansen  路  4Comments

woss picture woss  路  3Comments

CrossEye picture CrossEye  路  3Comments