Ramda: add R.toBool, alias to R.complement(R.not)

Created on 18 Nov 2017  路  1Comment  路  Source: ramda/ramda

Sometimes, I want to judge the value true or false. R.complement(R.not) can transform truth-y and false-y value to the corresponding Bool value, but a little bit long. So R.toBool is an convenient alias?

const toBool = R.complement(R.not)

Most helpful comment

there is already function Boolean in js for exactly this purpose

>All comments

there is already function Boolean in js for exactly this purpose

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanielFGray picture DanielFGray  路  3Comments

kostenko picture kostenko  路  3Comments

ldk18501 picture ldk18501  路  3Comments

makarkotlov picture makarkotlov  路  3Comments

lupuszr picture lupuszr  路  3Comments