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

@rushstack/node-core-library

Package Overview
Dependencies
Maintainers
3
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/node-core-library - npm Package Compare versions

Comparing version 3.53.1 to 3.53.2

18

lib/Sort.js

@@ -82,5 +82,10 @@ "use strict";

comparer = Sort.compareByValue) {
let isFirst = true;
let previous = undefined;
for (const element of collection) {
if (comparer(previous, element) > 0) {
if (isFirst) {
// Don't start by comparing against undefined.
isFirst = false;
}
else if (comparer(previous, element) > 0) {
return false;

@@ -107,6 +112,11 @@ }

comparer = Sort.compareByValue) {
let isFirst = true;
let previousKey = undefined;
for (const element of collection) {
const key = keySelector(element);
if (comparer(previousKey, key) > 0) {
if (isFirst) {
// Don't start by comparing against undefined.
isFirst = false;
}
else if (comparer(previousKey, key) > 0) {
return false;

@@ -135,7 +145,7 @@ }

static sortMapKeys(map, keyComparer = Sort.compareByValue) {
const pairs = Array.from(map.entries());
// Sorting a map is expensive, so first check whether it's already sorted.
if (Sort.isSortedBy(pairs, (x) => x[0], keyComparer)) {
if (Sort.isSorted(map.keys(), keyComparer)) {
return;
}
const pairs = Array.from(map.entries());
Sort.sortBy(pairs, (x) => x[0], keyComparer);

@@ -142,0 +152,0 @@ map.clear();

{
"name": "@rushstack/node-core-library",
"version": "3.53.1",
"version": "3.53.2",
"description": "Core libraries that every NodeJS toolchain project should use",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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