1.1.0 • Published 1 year ago

math-basics v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Math Basics

This package adds mathematic functions like: multiply, add, substract, etc.

Install

npm install math-basics@latest
yarn add math-basics@latest
pnpm add math-basics@latest

If you use this package with ESM (EcmaScript), please use the package: math-basics-esm

Example

const math = require('math-basics');
console.log(math.add(3, '2')); // Output: 5
console.log(math.sub(6, '3')); // Output: 3
console.log(math.multiply(7, '6')) // Output: 42
console.log(math.division(27, '9')) // Output: 3
console.log(math.remainder(70, '10')) // Output: 0
console.log(math.pow(3, '2')) // Output: 9
console.log(math.root(4, '256')) // Output: 4
console.log(math.randomArray([ 'one', 'two', 'three' ])) // Output: 'one'
console.log(math.randomNumber()) // Output: 47
console.log(math.average(9.1, '10', 27, '8.9', 90.5, '3.4')) // Output: 24.81666666...
1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago

1.0.1

2 years ago