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

rfc6902-ordered

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rfc6902-ordered - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

8

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

@@ -38,9 +38,9 @@ "main": "src",

"chai": "^4.1.2",
"cross-env": "^5.0.5",
"cross-env": "^6.0.0",
"eslint": "^6.1.0",
"eslint-config-sane": "0.8.5",
"eslint-config-sane-node": "0.2.2",
"eslint-plugin-json-files": "0.6.2",
"eslint-plugin-json-files": "0.8.0",
"eslint-plugin-mocha": "^6.0.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prefer-let": "^1.0.1",

@@ -47,0 +47,0 @@ "mocha": "^6.0.0",

@@ -0,0 +0,0 @@ # rfc6902-ordered

@@ -0,0 +0,0 @@ 'use strict';

@@ -40,5 +40,4 @@ 'use strict';

let indexInTo = toKeys.indexOf(addKey);
let indexInMy = myKeys.indexOf(addKey);
let indexInMy = -1;
// we should probably add a search threshold here

@@ -48,8 +47,13 @@ // so we don't match keys really far away

// search subsequent keys for match
for (let _indexInTo = indexInTo + 1; _indexInTo < toKeys.length; _indexInTo++) {
for (let _indexInTo = indexInTo + 1; indexInMy === -1 && _indexInTo < toKeys.length; _indexInTo++) {
let nextKey = toKeys[_indexInTo];
let _indexInMy = myKeys.indexOf(nextKey);
if (_indexInMy !== -1) {
indexInMy = _indexInMy;
break;
indexInMy = myKeys.indexOf(nextKey);
}
// search preceding keys for match
for (let _indexInTo = indexInTo - 1; indexInMy === -1 && _indexInTo >= 0; _indexInTo--) {
let prevKey = toKeys[_indexInTo];
indexInMy = myKeys.indexOf(prevKey);
if (indexInMy !== -1) {
indexInMy++;
}

@@ -59,16 +63,4 @@ }

if (indexInMy === -1) {
// search preceding keys for match
for (let _indexInTo = indexInTo - 1; _indexInTo >= 0; _indexInTo--) {
let prevKey = toKeys[_indexInTo];
let _indexInMy = myKeys.indexOf(prevKey);
if (_indexInMy !== -1) {
indexInMy = _indexInMy + 1;
break;
}
}
if (indexInMy === -1) {
// default to last entry
indexInMy = myKeys.length;
}
// default to last entry
indexInMy = myKeys.length;
}

@@ -75,0 +67,0 @@

@@ -0,0 +0,0 @@ 'use strict';

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