Determines if something should be considered a synonym for true
.
A modularized version of the truthy
function found in Functional Javascript by Michael Fogus.
$ npm i @bret/truthy --save
var truthy = require('@bret/truthy')
truthy(false) // false
truthy(undefined) // false
truthy(0) // true
truthy('') // true
Contributions welcome! Please read the contributing guidelines first.
- Functional Javascript by Michael Fogus
- "this is my best module" - substack