1.0.0 • Published 8 years ago

zero-or-negative v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

zero-or-negative

A micro library that returns value if negative and zero in any other case.

Travis CI npm npm

Installation

npm install --save zero-or-negative

Usage

const checkZeroOrNegative = require('zero-or-negative');

checkZeroOrNegative(-0);
// Output -0

checkZeroOrNegative(-10);
// Output -10

checkZeroOrNegative(110);
// Output 0

Tests

npm test

Contributing

PR's are most welcome.

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

License

MIT License