smart-boolean
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

smart-boolean

Convert various values to booleans and check if they are boolean-like.

npm License

Installation

Install the package using npm:

npm i smart-boolean

Or with yarn:

yarn add smart-boolean

Usage

const { boolean, isBooleanable } = require('smart-boolean');

console.log(boolean('yes'));           // true
console.log(boolean('maybe'));         // false
console.log(isBooleanable('false'));   // true
console.log(isBooleanable('123'));     // false

Package Sidebar

Install

npm i smart-boolean

Weekly Downloads

4

Version

1.0.1

License

Apache-2.0

Unpacked Size

14.8 kB

Total Files

10

Last publish

Collaborators

  • anshsinghsonkhia