1.4.5 • Published 3 years ago

ml-math v1.4.5

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

ml-math

Hi! I developed this small module for myself for fun. It focuses on mathematical operations and number manipulation.

Module

This module is divided into

  • numbers - isNumeric - isOdd - isEven - isPrime

  • calculator

    • add - addArray
    • subtract - subtractArray
    • multiply - multiplyArray
    • divide - divideArray

Usage

import via

npm i ml-math

or

yarn add ml-math

require

const {numbers, calculator} = require('ml-math');

and use it

let val = 10;
if (numbers.isNumeric(val) && numbers.isEven(val)) {
	val = calculator.add(val, 3); // 13
}
console.log(calculator.multiply(val, 10)); // 130
const array = [1, 2, 3, 4, 5];
console.log(calculator.multiplyArray(array)); // 120
1.4.5

3 years ago

1.3.7

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.8

3 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago