A small library that increase or decrease the last decimal
https://www.npmjs.com/package/lastdecimal
npm install lastdecimal
yarn add lastdecimal
lastdecimal(value: number, bool: boolean)
value: Any number with decimals
0.4211
= OK!
5152.31290
= OK!
123
= NOT OK!
bool: true / false
true
= increase last decimal with 1
false
= decrease last decimal with 1
var lastdecimal = require("lastdecimal")
var numUp = lastdecimal.lastdecimal(555.555, true);
var numDown = lastdecimal.lastdecimal(555.555, false);
console.log(numUp); // Should return 555.556
console.log(numDown); // Should return 555.554
Setup automated build with Travis
Analyse code-coverage with Codecov
Add badges to your readme with Shields. Everyone loves badges 😎
npm test
Create PR with description