numr

1.4.5 • Public • Published

Numr

Number is a package to facilitate the use of the Math object.

Description

This package makes it easy to manipulate numbers,

Numr 1.4.5 is the stable release.

Installation

npm  install  numr

Importer

// ES6
import * as numr  from  'numr';
// Commonjs
const numr = require('numr');

Examples

import { Calcul } from  'numr';

let  num1 = Calcul.getRandomNumber(1, 155, 'round')

let  num2 = Calcul.getRandomNumber(1, 155, 'decimal')

console.log(`Num1: ${num1} + Num2: ${num2}, Result: ${num1 + num2}`)

(New) Compressor

A new class has arrived within Numr, the Compressor. You will be able to compress and decompress your texts with the LZW algorithm (other algorithms will come later).

- Compressor.compress("test", {algorithm: "lzw"})
- Compressor.decompress(numr.Compressor.compress("test", {algorithm: "lzw"}), {algorithm: "lzw"})

Math Python

A new class has arrived within Numr, the MathPY class. You will be able to use Math methods only available in Python on JavaScript. There are only 4 at the moment.

- MathPY.comb(n, k)
- MathPY.fabs(x)
- MathPY.ldexp(x, i)
- MathPY.dist(p1, p2, q1, q2)

Creator

Hecone

/numr/

    Package Sidebar

    Install

    npm i numr

    Weekly Downloads

    8

    Version

    1.4.5

    License

    ISC

    Unpacked Size

    11.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • 10hecone