conditionally
Handle conditions easily
Installing
Using npm:
$ npm install conditionally
Using bower:
$ bower install conditionally
API
ternary
ternary callback
BooleannotBool;// orbool;
truthy
callback if true
BooleannotBool;// orbool;
falsy
callback if false
BooleannotBool;// orbool;
Example
bool
const isJohn = 'john' == name; // bool ;
notBool
const getCurrentUser = 'john'; // string (notBool) Boolean;
License
MIT. Copyright (c) 2017 Isaac Ferreira (zaclummys)