hadron-document
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -168,2 +168,18 @@ 'use strict'; | ||
/** | ||
* Determine if the key is a duplicate. | ||
* | ||
* @param {String} value - The value to check. | ||
* | ||
* @returns {Boolean} If the key is a duplicate. | ||
*/ | ||
isDuplicateKey(value) { | ||
if (value === this.currentKey) { | ||
return false; | ||
} | ||
return some(this.parentElement.elements, (element) => { | ||
return element.currentKey === value; | ||
}); | ||
} | ||
/** | ||
* Determine if the element is edited - returns true if | ||
@@ -170,0 +186,0 @@ * the key or value changed. |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/mongodb-js/hadron-document", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
24121
471