Socket
Socket
Sign inDemoInstall

es-toolkit

Package Overview
Dependencies
Maintainers
2
Versions
722
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 1.4.0-dev.88 to 1.4.0-dev.89

dist/chunk-6E6PBLFK.mjs

1

dist/index.d.ts

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

export { sum } from './math/sum.js';
export { maxBy } from './math/maxBy.js';
export { omit } from './object/omit.js';

@@ -43,0 +44,0 @@ export { omitBy } from './object/omitBy.js';

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

isUndefined: () => isUndefined,
maxBy: () => maxBy,
noop: () => noop,

@@ -456,2 +457,16 @@ omit: () => omit,

// src/math/maxBy.ts
function maxBy(elements, selector) {
let maxElement = elements[0];
let max = -Infinity;
for (const element of elements) {
const value = selector(element);
if (value > max) {
max = value;
maxElement = element;
}
}
return maxElement;
}
// src/object/omit.ts

@@ -558,2 +573,3 @@ function omit(obj, keys) {

isUndefined,
maxBy,
noop,

@@ -560,0 +576,0 @@ omit,

@@ -6,1 +6,2 @@ export { clamp } from './clamp.js';

export { sum } from './sum.js';
export { maxBy } from './maxBy.js';

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

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

@@ -67,5 +68,20 @@ randomInt: () => randomInt,

}
// src/math/maxBy.ts
function maxBy(elements, selector) {
let maxElement = elements[0];
let max = -Infinity;
for (const element of elements) {
const value = selector(element);
if (value > max) {
max = value;
maxElement = element;
}
}
return maxElement;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
clamp,
maxBy,
random,

@@ -72,0 +88,0 @@ randomInt,

2

package.json
{
"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.4.0-dev.88+3ecc0626",
"version": "1.4.0-dev.89+260bae96",
"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

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