neg

1.0.1 • Public • Published

Functional Negation

neg exports only one function that takes a test function and return a negated one that will return true if test returns falsy and false otherwise

Example

const neg = require('neg');

const isOdd = x => x % 2;

const isEven = neg(isOdd);

console.log(isEven(2)); // returns true
console.log(isEven(1)); // returns false

Readme

Keywords

none

Package Sidebar

Install

npm i neg

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tungv