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
1
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 0.8.1 to 0.8.2

14

lib/document.js

@@ -11,2 +11,9 @@ 'use strict';

/**
* The event constant.
*/
const Events = {
'Cancel': 'Document::Cancel'
};
/**
* Represents a document.

@@ -32,2 +39,9 @@ */

/**
* Send cancel event.
*/
cancel() {
this.emit(Events.Cancel);
}
/**
* Create the new document from the provided object.

@@ -34,0 +48,0 @@ *

22

lib/element.js

@@ -40,3 +40,3 @@ 'use strict';

this.elements.push(newElement);
this.emit(Events.Added);
this._bubbleUp(Events.Added);
return newElement;

@@ -94,3 +94,3 @@ }

}
this.emit(Events.Edited);
this._bubbleUp(Events.Edited);
}

@@ -105,3 +105,3 @@

this.currentKey = key;
this.emit(Events.Edited);
this._bubbleUp(Events.Edited);
}

@@ -186,3 +186,3 @@

this.removed = true;
this.emit(Events.Removed);
this._bubbleUp(Events.Removed);
}

@@ -206,3 +206,3 @@

}
this.emit(Events.Reverted);
this._bubbleUp(Events.Reverted);
}

@@ -242,2 +242,14 @@

}
_bubbleUp(evt) {
this.emit(evt);
var element = this.parentElement;
if (element) {
if (element.isRoot()) {
element.emit(evt);
} else {
element._bubbleUp(evt);
}
}
}
}

@@ -244,0 +256,0 @@

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

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

@@ -28,3 +28,3 @@ "type": "git",

"debug": "^2.2.0",
"hadron-type-checker": "0.0.1",
"hadron-type-checker": "0.1.0",
"lodash.foreach": "^4.3.0",

@@ -31,0 +31,0 @@ "lodash.isarray": "^4.0.0",

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