Socket
Book a DemoInstallSign in
Socket

nicemath

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nicemath

Basic math functions

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

nicemath

Tests

A simple math library for your daily math problems

Installation

To install the module, use npm:

npm install nicemath

Usage

import * as nice from 'nicemath';

// Examples
console.log(nice.add(2, 3)); // 5
console.log(nice.subtract(5, 2)); // 3
console.log(nice.multiply(3, 4)); // 12
console.log(nice.divide(10, 2)); // 5
console.log(nice.power(2, 3)); // 8
console.log(nice.sqrt(9)); // 3
console.log(nice.factorial(5)); // 120
console.log(nice.abs(-5)); // 5
console.log(nice.combination(5, 2)); // 10
console.log(nice.isPrime(7)); // true
// and more...

Contributing

Please refer to CONTRIBUTING.

License

This project is licensed under the MIT License.

Keywords

math

FAQs

Package last updated on 19 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts