Comparing version 2.4.1 to 2.4.2
# Changelog | ||
## v2.4.2 | ||
* Fixing monkey-related memory leak ([@jrust](https://github.com/jrust)). | ||
## v2.4.1 | ||
@@ -4,0 +8,0 @@ |
@@ -603,3 +603,3 @@ /** | ||
*/ | ||
Baobab.VERSION = '2.4.1'; | ||
Baobab.VERSION = '2.4.2'; | ||
module.exports = exports['default']; |
@@ -592,3 +592,3 @@ /* eslint eqeqeq: 0 */ | ||
function splice(array, startIndex, nb) { | ||
if (nb === undefined) nb = array.length - startIndex;else if (nb === null) nb = 0;else if (Number.isNaN(Number.parseInt(nb))) throw new Error('argument nb ' + nb + ' can not be parsed into a number!'); | ||
if (nb === undefined) nb = array.length - startIndex;else if (nb === null) nb = 0;else if (Number.isNaN(Number.parseInt(nb, 10))) throw new Error('argument nb ' + nb + ' can not be parsed into a number!'); | ||
nb = Math.max(0, nb); | ||
@@ -595,0 +595,0 @@ |
@@ -275,3 +275,3 @@ /** | ||
this.tree.off('write', this.writeListener); | ||
this.tree.off('_monkey', this.monkeyListener); | ||
this.tree.off('_monkey', this.recursiveListener); | ||
this.state.killed = true; | ||
@@ -278,0 +278,0 @@ |
@@ -118,3 +118,3 @@ /** | ||
if (!type.array(target) || target.length < 1) return false; | ||
if (target.length > 1 && Number.isNaN(Number.parseInt(target[1]))) return false; | ||
if (target.length > 1 && Number.isNaN(Number.parseInt(target[1], 10))) return false; | ||
@@ -121,0 +121,0 @@ return anyOf(target[0], ['number', 'function', 'object']); |
{ | ||
"name": "baobab", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "JavaScript persistent data tree with cursors.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/baobab.js", |
@@ -1032,3 +1032,7 @@ [![Build Status](https://travis-ci.org/Yomguithereal/baobab.svg)](https://travis-ci.org/Yomguithereal/baobab) | ||
In most complex use cases, you might need to release the manipulated objects, i.e. kill their event emitters and wipe their associated data. | ||
In most complex use cases, you might need to release the manipulated objects, | ||
i.e. kill their event emitters and wipe their associated data. For example, | ||
cursors with a dynamic path (e.g. `var cursor = tree.select(['items', { id: 5 }])`), will | ||
always create a cursor with listeners that need to be released when you are done | ||
using the cursor. | ||
@@ -1035,0 +1039,0 @@ Thus, any tree or cursor object can be cleared from memory by using the `release` method. |
@@ -594,2 +594,2 @@ /** | ||
*/ | ||
Baobab.VERSION = '2.4.1'; | ||
Baobab.VERSION = '2.4.2'; |
@@ -577,3 +577,3 @@ /* eslint eqeqeq: 0 */ | ||
nb = 0; | ||
else if (Number.isNaN(Number.parseInt(nb))) | ||
else if (Number.isNaN(Number.parseInt(nb, 10))) | ||
throw new Error(`argument nb ${nb} can not be parsed into a number!`); | ||
@@ -580,0 +580,0 @@ nb = Math.max(0, nb); |
@@ -266,3 +266,3 @@ /** | ||
this.tree.off('write', this.writeListener); | ||
this.tree.off('_monkey', this.monkeyListener); | ||
this.tree.off('_monkey', this.recursiveListener); | ||
this.state.killed = true; | ||
@@ -269,0 +269,0 @@ |
@@ -117,3 +117,3 @@ /** | ||
return false; | ||
if(target.length > 1 && Number.isNaN(Number.parseInt(target[1]))) | ||
if (target.length > 1 && Number.isNaN(Number.parseInt(target[1], 10))) | ||
return false; | ||
@@ -120,0 +120,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
205962
1093