Comparing version 2.3.4 to 2.4.0
# Changelog | ||
## v2.4.0 | ||
* Handling non-enumerable properties ([@BrendanAnnable](https://github.com/BrendanAnnable)). | ||
## v2.3.4 | ||
@@ -4,0 +8,0 @@ |
@@ -603,3 +603,3 @@ /** | ||
*/ | ||
Baobab.VERSION = '2.3.4'; | ||
Baobab.VERSION = '2.4.0'; | ||
module.exports = exports['default']; |
@@ -240,6 +240,10 @@ /* eslint eqeqeq: 0 */ | ||
var k = undefined; | ||
var i = undefined, | ||
l = undefined, | ||
k = undefined; | ||
// NOTE: could be possible to erase computed properties through `null`. | ||
for (k in item) { | ||
var props = Object.getOwnPropertyNames(item); | ||
for (i = 0, l = props.length; i < l; i++) { | ||
k = props[i]; | ||
if (_type2['default'].lazyGetter(item, k)) { | ||
@@ -251,4 +255,9 @@ Object.defineProperty(o, k, { | ||
}); | ||
} else if (hasOwnProp.call(item, k)) { | ||
o[k] = deep ? cloner(true, item[k]) : item[k]; | ||
} else { | ||
Object.defineProperty(o, k, { | ||
value: deep ? cloner(true, item[k]) : item[k], | ||
enumerable: Object.getOwnPropertyDescriptor(item, k).enumerable, | ||
writable: true, | ||
configurable: true | ||
}); | ||
} | ||
@@ -255,0 +264,0 @@ } |
{ | ||
"name": "baobab", | ||
"version": "2.3.4", | ||
"version": "2.4.0", | ||
"description": "JavaScript persistent data tree with cursors.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/baobab.js", |
@@ -594,2 +594,2 @@ /** | ||
*/ | ||
Baobab.VERSION = '2.3.4'; | ||
Baobab.VERSION = '2.4.0'; |
@@ -209,6 +209,8 @@ /* eslint eqeqeq: 0 */ | ||
let k; | ||
let i, l, k; | ||
// NOTE: could be possible to erase computed properties through `null`. | ||
for (k in item) { | ||
const props = Object.getOwnPropertyNames(item); | ||
for (i = 0, l = props.length; i < l; i++) { | ||
k = props[i]; | ||
if (type.lazyGetter(item, k)) { | ||
@@ -221,4 +223,9 @@ Object.defineProperty(o, k, { | ||
} | ||
else if (hasOwnProp.call(item, k)) { | ||
o[k] = deep ? cloner(true, item[k]) : item[k]; | ||
else { | ||
Object.defineProperty(o, k, { | ||
value: deep ? cloner(true, item[k]) : item[k], | ||
enumerable: Object.getOwnPropertyDescriptor(item, k).enumerable, | ||
writable: true, | ||
configurable: true | ||
}); | ||
} | ||
@@ -225,0 +232,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204662
5011