Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aryth/math

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aryth/math - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

15

dist/index.cjs.js

@@ -7,2 +7,4 @@ 'use strict';

/**
*
* applicable for smaller number
* @param {number} x

@@ -13,2 +15,9 @@ * @returns {number}

const round = x => x + (x > 0 ? 0.5 : -0.5) << 0;
const E2 = 1E+2;
const E4 = 1E+4;
const MILLION = 1E+6;
const roundD1 = x => Math.round(x * 10) / 10;
const roundD2 = x => Math.round(x * E2) / E2;
const roundD4 = x => Math.round(x * E4) / E4; // export const roundD2=x=>Math.round()
/**

@@ -34,2 +43,5 @@ * Get an integer absolute of a number

exports.E2 = E2;
exports.E4 = E4;
exports.MILLION = MILLION;
exports.abs = abs;

@@ -41,1 +53,4 @@ exports.almostEquals = almostEquals;

exports.round = round;
exports.roundD1 = roundD1;
exports.roundD2 = roundD2;
exports.roundD4 = roundD4;

11

dist/index.esm.js
const abs = n => n < 0 ? 0 - n : n;
/**
*
* applicable for smaller number
* @param {number} x

@@ -8,2 +10,9 @@ * @returns {number}

const round = x => x + (x > 0 ? 0.5 : -0.5) << 0;
const E2 = 1E+2;
const E4 = 1E+4;
const MILLION = 1E+6;
const roundD1 = x => Math.round(x * 10) / 10;
const roundD2 = x => Math.round(x * E2) / E2;
const roundD4 = x => Math.round(x * E4) / E4; // export const roundD2=x=>Math.round()
/**

@@ -29,2 +38,2 @@ * Get an integer absolute of a number

export { abs, almostEquals, almostInt, intAbs, intExpon, round };
export { E2, E4, MILLION, abs, almostEquals, almostInt, intAbs, intExpon, round, roundD1, roundD2, roundD4 };

4

package.json
{
"name": "@aryth/math",
"version": "0.1.2",
"version": "0.1.3",
"description": "A math util library",

@@ -32,3 +32,3 @@ "main": "dist/index.cjs.js",

"homepage": "https://github.com/hoyeungw/aryth#readme",
"gitHead": "37243125d4bae3bc432636026516c30f8c2e64e3"
"gitHead": "c0890f1284b22209726d942f6fb2aac8cea11ca5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc