1.0.0 • Published 8 years ago
zero-or-negative v1.0.0
zero-or-negative
A micro library that returns value if negative and zero in any other case.
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
1.0.0
8 years ago