immutable
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -10,2 +10,10 @@ /** | ||
/** | ||
* Cursor is expected to be required in a node or other CommonJS context: | ||
* | ||
* var Cursor = require('immutable/contrib/cursor'); | ||
* | ||
* If you wish to use it in the browser, please check out Browserify or WebPack! | ||
*/ | ||
var Immutable = require('../../'); | ||
@@ -83,3 +91,3 @@ var Iterable = Immutable.Iterable; | ||
KeyedCursorPrototype.set = function(key, value) { | ||
return updateCursor(this, m => m.set(key, value), key); | ||
return updateCursor(this, function (m) { return m.set(key, value); }, key); | ||
} | ||
@@ -91,3 +99,3 @@ | ||
IndexedCursorPrototype['delete'] = function(key) { | ||
return updateCursor(this, m => m.remove(key), key); | ||
return updateCursor(this, function (m) { return m.remove(key); }, key); | ||
} | ||
@@ -97,3 +105,3 @@ | ||
IndexedCursorPrototype.clear = function() { | ||
return updateCursor(this, m => m.clear()); | ||
return updateCursor(this, function (m) { return m.clear(); }); | ||
} | ||
@@ -105,3 +113,5 @@ | ||
updateCursor(this, keyOrFn) : | ||
updateCursor(this, map => map.update(keyOrFn, notSetValue, updater), keyOrFn); | ||
updateCursor(this, function (map) { | ||
return map.update(keyOrFn, notSetValue, updater); | ||
}, keyOrFn); | ||
} | ||
@@ -111,3 +121,5 @@ | ||
IndexedCursorPrototype.withMutations = function(fn) { | ||
return updateCursor(this, m => (m || Map()).withMutations(fn)); | ||
return updateCursor(this, function (m) { | ||
return (m || Map()).withMutations(fn); | ||
}); | ||
} | ||
@@ -126,5 +138,6 @@ | ||
IndexedCursorPrototype.__iterate = function(fn, reverse) { | ||
var deref = this.deref(); | ||
var cursor = this; | ||
var deref = cursor.deref(); | ||
return deref && deref.__iterate ? deref.__iterate( | ||
(v, k) => fn(wrappedValue(this, k, v), k, this), | ||
function (v, k) { return fn(wrappedValue(cursor, k, v), k, cursor); }, | ||
reverse | ||
@@ -131,0 +144,0 @@ ) : 0; |
{ | ||
"name": "immutable", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Immutable Data Collections", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js", |
Immutable Data Collections | ||
========================== | ||
**Converting to v3 from v2? Check out the [upgrade guide](https://github.com/facebook/immutable-js/wiki/Upgrading-to-Immutable-v3).** | ||
Immutable data cannot be changed once created, leading to much simpler | ||
@@ -84,3 +86,2 @@ application development, no defensive copying, and enabling advanced memoization | ||
### Converting to v3 from v2? Check out the [upgrade guide](https://github.com/facebook/immutable-js/wiki/Upgrading-to-Immutable-v3). | ||
@@ -87,0 +88,0 @@ The case for Immutability |
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
258905
5963
368