true-zero

1.0.7 • Public • Published

True Zero

desc

a simple package to convert value of true to 1, false to 0, and also the otherwise value

installation

npm install true-zero

how to use

it is simple, import it and you ready to go

const trueZero = require('true-zero') 
trueZero(false) // will return 0 

or if you want to import it inside a module

import trueZero from 'true-zero
...
trueZero(true) // will return 1

string and integer

you can pass parameter by any type, boolean, string, and integer

good luck

Readme

Keywords

Package Sidebar

Install

npm i true-zero

Weekly Downloads

3

Version

1.0.7

License

ISC

Unpacked Size

1.82 kB

Total Files

3

Last publish

Collaborators

  • kdkchy