New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hadron-document

Package Overview
Dependencies
Maintainers
26
Versions
546
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hadron-document - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

document.diff

23

lib/document.js

@@ -68,2 +68,25 @@ 'use strict';

/**
* Get an element by a series of segment names.
*
* @param {Array} path - The series of fieldnames. Cannot be empty.
*
* @returns {Element} The element.
*/
getChild(path) {
if (!path) {
return undefined;
}
let element = this.elements.get(path[0]);
let i = 1;
while (i < path.length) {
if (element === undefined) {
return undefined;
}
element = element.get(path[i]);
i++;
}
return element;
}
/**
* Get the _id value for the document.

@@ -70,0 +93,0 @@ *

7

lib/element.js

@@ -91,7 +91,6 @@ 'use strict';

}
} else {
if (this.isModified()) {
this.revert();
}
}
if (this.isModified()) {
this.revert();
}
}

@@ -98,0 +97,0 @@

@@ -7,3 +7,3 @@ {

"homepage": "https://github.com/mongodb-js/hadron-document",
"version": "3.1.0",
"version": "3.1.1",
"repository": {

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

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