Socket
Socket
Sign inDemoInstall

rfc6902-ordered

Package Overview
Dependencies
2
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.3 to 4.0.4

2

package.json
{
"name": "rfc6902-ordered",
"version": "4.0.3",
"version": "4.0.4",
"description": "https://github.com/chbrown/rfc6902 plus object key ordering",

@@ -5,0 +5,0 @@ "main": "src",

@@ -55,2 +55,21 @@ 'use strict';

// if the nearest matching keys are still above and below accordingly, skip
let upIndexInMy = -1;
let downIndexInMy = -1;
for (let upToKey of toKeys.slice(0, indexInTo).reverse()) {
upIndexInMy = myKeys.indexOf(upToKey);
if (upIndexInMy !== -1) {
break;
}
}
for (let downToKey of toKeys.slice(indexInTo + 1)) {
downIndexInMy = myKeys.indexOf(downToKey);
if (downIndexInMy !== -1) {
break;
}
}
if ((upIndexInMy === -1 || upIndexInMy < indexInMy) && (downIndexInMy === -1 || downIndexInMy > indexInMy)) {
continue;
}
let value = myPackageJson[key];

@@ -57,0 +76,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc