1.0.4 • Published 1 year ago

mathbasics-esm v1.0.4

Weekly downloads
-
License
ISC
Repository
github
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 CJS (CommonJS), please use the package: mathbasics

Example

import math from 'mathbasics-esm';
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.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago