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

reftools

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reftools - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

12

lib/recurse.js

@@ -12,4 +12,3 @@ 'use strict';

payload: {},
seen: [],
seenPaths: [],
seen: new WeakMap(),
identity: false,

@@ -38,10 +37,8 @@ identityDetection: false

state.path = (state.path ? state.path : '#') + escKey;
let seenIndex = state.identityDetection ? state.seen.indexOf(object[key]) : -1;
state.identity = (seenIndex >= 0);
state.identityPath = (state.identity ? state.seenPaths[seenIndex] : undefined);
state.identityPath = state.seen.get(object[key]);
state.identity = (typeof state.identityPath !== 'undefined');
callback(object, key, state);
if ((typeof object[key] === 'object') && (!state.identity)) {
if (state.identityDetection && !Array.isArray(object[key])) {
state.seen.push(object[key]);
state.seenPaths.push(state.path);
state.seen.set(object[key],state.path);
}

@@ -55,3 +52,2 @@ let newState = {};

newState.seen = state.seen;
newState.seenPaths = state.seenPaths;
newState.identity = false;

@@ -58,0 +54,0 @@ newState.identityDetection = state.identityDetection;

{
"name": "reftools",
"version": "0.0.15",
"version": "0.0.16",
"description": "Utility functions to deal with references in objects",

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

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