Socket
Socket
Sign inDemoInstall

doc-path

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doc-path - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

2

package.json

@@ -5,3 +5,3 @@ {

"description": "A document path library for Node",
"version": "2.0.4",
"version": "2.1.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -39,4 +39,7 @@ 'use strict';

// If there is a '.' in the keyPath, recur on the subdoc and ...
if (indexOfDot >= 0) {
if (currentKey === '__proto__' || document === Object && currentKey === 'prototype') {
// Refuse to modify anything on __proto__, return the document
return document;
} else if (indexOfDot >= 0) {
// If there is a '.' in the keyPath, recur on the subdoc and ...
if (!document[currentKey] && Array.isArray(document)) {

@@ -43,0 +46,0 @@ // If this is an array and there are multiple levels of keys to iterate over, recur.

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