get-truthy
v1.0.0
Published
Find a value that will make your expression truthy
Downloads
2
Readme
get-truthy
Show me a binary operator and a value, I'll show you another value to make it truthy.
Usage
? > 9
import getTruthy from 'get-truthy'
getTruthy.left('>', 9)
// 10
9 > ?
import getTruthy from 'get-truthy'
getTruthy.right('>', 9)
// 8
Supported Operators
Relational > < >= <=
Equality == === != !==
Arithmetic + - * / % **
Logical && ||
Development
- tests -
yarn test
- watch -
yarn watch
- dev mode -
yarn dev --inspect
- lint -
yarn lint