Skip to content

reergymerej/get-truthy

Repository files navigation

get-truthy

Show me a binary operator and a value, I'll show you another value to make it truthy.

Build Status Coverage Status

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

About

Find a value that will make your expression truthy

Resources

Stars

Watchers

Forks

Packages

No packages published