exponentiation

1.0.16 • Public • Published

License: MIT npm npm

exponentiation

A Node.js package that assists in easy exponentiation.

Usage

First, install the package using npm:

    npm i exponentiation -P

Then, require the package and use it like so:

    const exp = require('exponentiation');
 
    console.log(exp(2, 10)); // 1024
    console.log(exp(1, '0')); // 1
    console.log(exp(null, 3)); // Error: Both arguments must be numbers.
    console.log(exp(1, undefined)); // Error: Both arguments must be numbers.

License

MIT

Package Sidebar

Install

Weekly Downloads

0

Version

1.0.16

License

MIT

Unpacked Size

3.42 kB

Total Files

5

Last publish

Collaborators

  • yosef.spira