hadron-document
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -175,3 +175,3 @@ 'use strict'; | ||
/** | ||
* Rename the element. | ||
* Rename the element. Update the parent's mapping if available. | ||
* | ||
@@ -181,2 +181,8 @@ * @param {String} key - The new key. | ||
rename(key) { | ||
if (this.parent !== undefined) { | ||
const elm = this.parent.elements._map[this.currentKey]; | ||
delete this.parent.elements._map[this.currentKey]; | ||
this.parent.elements._map[key] = elm; | ||
} | ||
this.currentKey = key; | ||
@@ -183,0 +189,0 @@ this._bubbleUp(Events.Edited); |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/mongodb-js/hadron-document", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
59981
16
936
1