Skip to content

Miljoen/truify

Repository files navigation

Truify npm version

Simple package that truifies any input.

For more information, you are kindly referred to the Examples section.

Technology

TypeScript JavaScript

Quick links

Installation

npm install truify

Examples

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!

Contributors

View the full list of contributors.

About

Simple package that truifies any input.

Resources

License

Stars

Watchers

Forks

Packages

No packages published