Simple package that truifies any input.
For more information, you are kindly referred to the Examples section.
- Consult CHANGELOG.md for the project history.
- View package repository on GitHub.
npm install truify
import { truify } from 'truify' // Supports ESM imports
truify(true) // true
truify(1) // true
truify(0.1) // true
truify(10) // true
truify(-1) // true
truify('String') // true
truify({}) // true
truify([]) // true
truify(false) // false
truify(0) // false
truify(null) // false
truify(NaN) // false
truify('') // false
truify() // Error!
View the full list of contributors.