Skip to content

bsiddiqui/arithmetic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arithmetic

Build Status Code Climate Version Downloads

Arithmetic safely conducts arithmetic operations by ensuring the values are valid numbers and typecasting them prior to evaluation.

Install

$ npm install --save arithmetic

Usage

var arithmetic = require('arithmetic')

arithmetic.add(4, 2)
// => 6

API

arithmetic.add(num1, num2) -> number

num1/num2

Required
Type: number

arithmetic.sum(numbers) -> number

numbers

Required
Type: number array

arithmetic.subtract(num1, num2) -> number

num1/num2

Required
Type: number

arithmetic.difference(numbers) -> number

numbers

Required
Type: number array

arithmetic.multiply(num1, num2) -> number

num1/num2

Required
Type: number

arithmetic.product(numbers) -> number

numbers

Required
Type: number array

arithmetic.divide(num1, num2) -> number

num1/num2

Required
Type: number

arithmetic.quotient(numbers) -> number

numbers

Required
Type: number array

About

utility for safely performing arithmetic

Resources

License

Stars

Watchers

Forks

Packages

No packages published