1.2.3 • Published 5 years ago

@isaidnocookies/stringmath v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

StringMath is a basic module that allows common math functions to be applied to strings.

Current functions are:

  • add
  • subtract
  • isGreaterThan
  • isGreaterThanOrEqualTo
  • isLessThan
  • isLessThanOrEqualTo
  • isEqual
  • roundUpToNearest0001
  • sciToDecimal

Current Limitations!

  • Does not support negative numbers

Useage

Coming soon...

Installation

$ npm install -s @isaidnocookies/StringMath

Useage

var StringMath = require('@isaidnocookies/StringMath');

var stringmath = new StringMath();
var addresult = parseFloat(stringmath.add("0.001", "0.002"));
var subresult = parseFloat(stringmath.subtract("0.2", "0.1"));

console.log("0.001 + 0.002 = " + addresult); // '0.003'
console.log("0.2 - 0.1 = " + subresult); // '0.01'

Also, check out ThreeBx

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago