resource-calculator

0.4.2 • Public • Published

calculator

a basic calculator

API

properties

methods

a basic calculator

  • id

    • type : any

methods

calculator.add(options, callback)

returns the sum of two numbers

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.subtract(options, callback)

returns the difference of two numbers

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.multiply(options, callback)

returns the product of two numbers

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.divide(options, callback)

returns the result by dividing two numbers

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.power(options, callback)

returns the raised power of two numbers

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.squareroot(options, callback)

returns the squareoot of number

  • options

    • type : object

    • properties

      • a

        • type : number
  • callback

    • type : function

    • required : false

calculator.cuberoot(options, callback)

returns the cuberoot of number

  • options

    • type : object

    • properties

      • a

        • type : number
  • callback

    • type : function

    • required : false

calculator.nthroot(options, callback)

returns the nthroot of number

  • options

    • type : object

    • properties

      • a

        • type : number
      • b

        • type : number
  • callback

    • type : function

    • required : false

calculator.factorial(options, callback)

returns the factorial of number

  • options

    • type : object

    • properties

      • a

        • type : number
  • callback

    • type : function

    • required : false

calculator.isEven(options, callback)

returns the result of number as even

  • options

    • type : object

    • properties

      • a

        • type : number
  • callback

    • type : function

    • required : false

calculator.isOdd(options, callback)

returns the result of number as odd

  • options

    • type : object

    • properties

      • a

        • type : number
  • callback

    • type : function

    • required : false

README auto-generated with docs

Readme

Keywords

none

Package Sidebar

Install

npm i resource-calculator

Weekly Downloads

0

Version

0.4.2

License

none

Last publish

Collaborators

  • marak