mathematic

1.0.1 • Public • Published

cli-mathematic

A lib to use mathematical operators

Note: need node >= 6

Usage

const math = require('mathematic');
 
math.sum(1, 2); // 3
/* You can use arrays */
math.sum([1,2,3,'4',66,74]); // 150
math.sub(56,44); // 12
math.multi(14, 37); // 518
math.div(3, 4); // 0.75

API

sum(numbers)

Parameter Type Value
numbers number or array any number (in array or not)

sub(numbers)

Parameter Type Value
numbers number or array any number (in array or not)

multi(numbers)

Parameter Type Value
numbers number or array any number (in array or not)

div(numbers)

Parameter Type Value
numbers number or array any number (in array or not)

Package Sidebar

Install

npm i mathematic

Weekly Downloads

7

Version

1.0.1

License

MIT

Last publish

Collaborators

  • john-luc