@sillyangel/math
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Basic math methods

travis test GitHub issues GitHub last commit npm NPM

How to install

npm install @sillyangel/math

How to use

// require
const basicMaths = require("@sillyangel/math");

Or you can add to your package.json the property "type": "module", and use instead

// import
import basicMaths from '@sillyangel/math';
// methods
const add = basicMaths.add(1, 3); // return 4

const substract = basicMaths.substract(1, 2); // return -1

const multiply = basicMaths.multiply(1, 2); // return 2

const divideGood = basicMaths.divide(1, 2); // Good - return 0.5

const divideBad = basicMaths.divide(1, 0); // Bad - No number is divisible by zero

const powOperation = basicMaths.powOperation(2, 2); // return 8

GitHub code size in bytes npm GitHub forks GitHub stars jsDelivr GitHub contributors npm collaborators

CNDs

If your application is not from Node and you still want to use it on the frontend, you can import the CDN that is hosted on jsDelivr

How to import

Just copy and paste in your html this script

<script src="https://cdn.jsdelivr.net/npm/@sillyangel/math@1.0.0/index.min.js"></script>

Readme

Keywords

Package Sidebar

Install

npm i @sillyangel/math

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

42.1 kB

Total Files

37

Last publish

Collaborators

  • sillyangel