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

tylerlong picture tylerlong  路  3Comments

sugoidesune picture sugoidesune  路  3Comments

lupuszr picture lupuszr  路  3Comments

alexcarruthers picture alexcarruthers  路  3Comments

kostenko picture kostenko  路  3Comments