🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

es-toolkit

Package Overview
Dependencies
Maintainers
0
Versions
1212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-toolkit - npm Package Compare versions

Comparing version

to
1.5.0-dev.107

dist/chunk-NOFHNJ5C.mjs

1

dist/index.d.ts

@@ -40,2 +40,3 @@ export { chunk } from './array/chunk.js';

export { clamp } from './math/clamp.js';
export { mean } from './math/mean.js';
export { random } from './math/random.js';

@@ -42,0 +43,0 @@ export { randomInt } from './math/randomInt.js';

25

dist/index.js

@@ -59,2 +59,3 @@ "use strict";

maxBy: () => maxBy,
mean: () => mean,
minBy: () => minBy,

@@ -471,2 +472,16 @@ noop: () => noop,

// src/math/sum.ts
function sum(nums) {
let result = 0;
for (const num of nums) {
result += num;
}
return result;
}
// src/math/mean.ts
function mean(nums) {
return sum(nums) / nums.length;
}
// src/math/random.ts

@@ -494,11 +509,2 @@ function random(minimum, maximum) {

// src/math/sum.ts
function sum(nums) {
let result = 0;
for (const num of nums) {
result += num;
}
return result;
}
// src/math/range.ts

@@ -627,2 +633,3 @@ function range(start, end, step) {

maxBy,
mean,
minBy,

@@ -629,0 +636,0 @@ noop,

export { clamp } from './clamp.js';
export { mean } from './mean.js';
export { random } from './random.js';

@@ -3,0 +4,0 @@ export { randomInt } from './randomInt.js';

@@ -24,2 +24,3 @@ "use strict";

clamp: () => clamp,
mean: () => mean,
random: () => random,

@@ -41,2 +42,16 @@ randomInt: () => randomInt,

// src/math/sum.ts
function sum(nums) {
let result = 0;
for (const num of nums) {
result += num;
}
return result;
}
// src/math/mean.ts
function mean(nums) {
return sum(nums) / nums.length;
}
// src/math/random.ts

@@ -64,11 +79,2 @@ function random(minimum, maximum) {

// src/math/sum.ts
function sum(nums) {
let result = 0;
for (const num of nums) {
result += num;
}
return result;
}
// src/math/range.ts

@@ -96,2 +102,3 @@ function range(start, end, step) {

clamp,
mean,
random,

@@ -98,0 +105,0 @@ randomInt,

@@ -14,4 +14,4 @@ /**

*/
declare function sum(nums: number[]): number;
declare function sum(nums: readonly number[]): number;
export { sum };
{
"name": "es-toolkit",
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
"version": "1.5.0-dev.106+0c9afc27",
"version": "1.5.0-dev.107+715bc60b",
"workspaces": [

@@ -6,0 +6,0 @@ "docs"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet