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

@mathigon/fermat

Package Overview
Dependencies
Maintainers
0
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mathigon/fermat - npm Package Compare versions

Comparing version 1.1.21 to 1.1.22

19

dist/index.cjs.js

@@ -1072,13 +1072,10 @@ "use strict";

for (const v of values) {
if (!counts.has(v)) {
counts.set(v, 1);
} else {
const newCount = counts.get(v) + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = void 0;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}
if (!counts.has(v)) counts.set(v, 0);
const newCount = counts.get(v) + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = void 0;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}

@@ -1085,0 +1082,0 @@ }

@@ -1006,13 +1006,10 @@ var __defProp = Object.defineProperty;

for (const v of values) {
if (!counts.has(v)) {
counts.set(v, 1);
} else {
const newCount = counts.get(v) + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = void 0;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}
if (!counts.has(v)) counts.set(v, 0);
const newCount = counts.get(v) + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = void 0;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}

@@ -1019,0 +1016,0 @@ }

{
"name": "@mathigon/fermat",
"version": "1.1.21",
"version": "1.1.22",
"license": "MIT",

@@ -38,3 +38,3 @@ "homepage": "https://mathigon.io/fermat",

"dependencies": {
"@mathigon/core": "1.1.20"
"@mathigon/core": "1.1.21"
},

@@ -45,5 +45,5 @@ "devDependencies": {

"@typescript-eslint/parser": "8.0.0",
"esbuild": "0.23.1",
"eslint": "8.57.0",
"eslint-plugin-import": "2.30.0",
"esbuild": "0.24.0",
"eslint": "8.57.1",
"eslint-plugin-import": "2.31.0",
"tape": "5.9.0",

@@ -50,0 +50,0 @@ "ts-node": "10.9.2",

@@ -52,13 +52,10 @@ // ============================================================================

for (const v of values) {
if (!counts.has(v)) {
counts.set(v, 1);
} else {
const newCount = counts.get(v)! + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = undefined;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}
if (!counts.has(v)) counts.set(v, 0);
const newCount = counts.get(v)! + 1;
counts.set(v, newCount);
if (newCount === maxCount) {
result = undefined;
} else if (newCount > maxCount) {
maxCount = newCount;
result = v;
}

@@ -65,0 +62,0 @@ }

@@ -8,5 +8,16 @@ // =============================================================================

import tape from 'tape';
import {quantile} from '../src';
import {mode, quantile} from '../src';
tape('mode', (test) => {
test.equal(mode([]), undefined);
test.equal(mode([2]), 2);
test.equal(mode([2, 3]), undefined);
test.equal(mode([2, 3, 3]), 3);
test.equal(mode([2, 2, 3, 3, 4]), undefined);
test.equal(mode([2, 2, 2, 3, 3, 4]), 2);
test.end();
});
tape('quantile', (test) => {

@@ -13,0 +24,0 @@ test.equal(quantile([], 0.5), 0);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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