Package: effect
Module: Boolean
Exposes the global boolean constructor for JavaScript truthiness coercion.
When to use
Use to access native JavaScript truthiness coercion from the Effect module namespace.
Gotchas
This follows native truthiness rules. For example, non-empty strings such as
"false" coerce to true.
Example (Coercing values to booleans)
import { Boolean } from "effect"
const bool = Boolean.Boolean(1)
console.log(bool) // true
const fromString = Boolean.Boolean("false")
console.log(fromString) // true (non-empty string)
const fromZero = Boolean.Boolean(0)
console.log(fromZero) // false
Signature
declare const Boolean: BooleanConstructor
Since v4.0.0