oguzsh / check-if-falsy-except-value

if you need ignore your falsy value from your expression you can use this little package

Home Page:https://www.npmjs.com/package/check-if-falsy-except-value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if you need ignore your falsy value from your expression you can use this little package

install

link

npm i check-if-falsy-except-value

usage

scenario, we have to make sure that data is true;

if(!!data) {
  // ...
}

yes it is work but we need to use 0 or another falsy value;

if(toBool(data, 0)) {
  // ...
}

it is the all feature this package

About

if you need ignore your falsy value from your expression you can use this little package

https://www.npmjs.com/package/check-if-falsy-except-value

License:MIT License


Languages

Language:TypeScript 100.0%