diff --git a/README.md b/README.md
index 505d6ac4..377784aa 100644
--- a/README.md
+++ b/README.md
@@ -20,55 +20,10 @@ immutadâ—Źt gives you a short and meaningful syntax to apply operations on immut
[![codecov](https://codecov.io/gh/Zenika/immutadot/branch/master/graph/badge.svg)](https://codecov.io/gh/Zenika/immutadot)
[![Greenkeeper](https://badges.greenkeeper.io/Zenika/immutadot.svg)](https://greenkeeper.io/)
-## [1.0 Release Candidate](https://github.com/Zenika/immutadot/releases) is out 🎉
-
-We are still writing the documentation, you can already find out about the [updated API](https://zenika.github.io/immutadot/immutadot/1.0) and our new package [immutadot-lodash](https://zenika.github.io/immutadot/immutadot-lodash/1.0).
-
-If you would like to try out 1.0 before its official release, install it with :
-
-```shell
-yarn add immutadot@next
-```
-
-or
-
-
-```shell
-npm install immutadot@next
-```
+## [1.0](https://github.com/Zenika/immutadot/releases) is out 🎉
If you were using a previous version of immutadâ—Źt, check out the [migrating guide](docs/MIGRATING_TO_1_0.md).
-## Immutability
-
-In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
-
-An immutable object is an object that cannot be changed once created. It brings several benefits[1](#notes) :
-
-- Data changes detection made simple (Shallow comparison)
-- Memoization
-- Improve rendering performances
-- Explicit data changes
-- Avoid side effects
-
-## Our approach
-
-### Concise
-
-[ES2015+](https://mdn.io/JavaScript/Reference) new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
-
-### Interoperability
-
-immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
-
-### Exhaustive and yet extensible
-
-immutadâ—Źt comes with a large set of built-in utilities, mostly based on [ES2015+](https://mdn.io/JavaScript/Reference). You can also find a package called [immutadot-lodash](https://github.com/Zenika/immutadot/tree/master/packages/immutadot-lodash) with some of [lodash](https://lodash.com/)'s utilities. You haven't found what you're looking for? Do it yourself with the [`convert`](https://zenika.github.io/immutadot/immutadot/1.0/core.html#.convert) feature.
-
-### Learning curve
-
-If you are already familiar with [ES2015+](https://mdn.io/JavaScript/Reference) and [lodash](https://lodash.com/) then you should be able to use immutadâ—Źt quickly.
-
## Installation
immutadâ—Źt is available on [npm repository](https://www.npmjs.com/package/immutadot).
@@ -103,90 +58,43 @@ const { set } = require('immutadot')
### Example
-Object used in the following example:
+Quickly set nested properties using [set()](https://zenika.github.io/immutadot/immutadot/1.0/core.html#.set)
```js
+import { set } from 'immutadot'
+
const animals = {
- weasels: [
- {
- vernacularName: 'badger',
- scientificName: 'Meles meles'
+ weasels: {
+ lutraLutra: {
+ commonNames: ['eurasian otter'],
},
- {
- vernacularName: 'otter',
- }
- ]
+ },
}
-```
-
-Let's add the otter's scientific name without mutating the original object structure.
-using ES2015+:
-
-```js
-const newAnimals = {
- ...animals,
- weasels: [...animals.weasels]
-}
-
-newAnimals.weasels[1] = {
- ...newAnimals.weasels[1],
- scientificName: 'Lutrinae'
-}
-```
-
-using immutadâ—Źt:
-
-```js
-const newAnimals = set(animals, 'weasels[1].scientificName', 'Lutrinae')
+const newAnimals = set(animals, 'weasels.lutraLutra.name', 'Lutrinae')
```
+Learn more about what immutadâ—Źt can do in the [Getting started](https://github.com/Zenika/immutadot/blob/master/docs/GETTING_STARTED.md).
Feel free to [try immutadâ—Źt on runkit](https://npm.runkit.com/immutadot).
-## Path notation
-
-immutadâ—Źt brings a few improvements to the classic dot notation:
-
-### Slice notation
-
-The slice notation lets you iterate over arrays to apply operations without having to map arrays at each level of imbrication.
-
-We forgot to capitalize vernacular names in the [input](#Example).
-
-using ES2015+:
+## Documentation
-```js
-import { capitalize } from 'lodash'
-const newAnimals = {
- ...animals,
- weasels: animals.weasels.map(weasel => {
- return {
- ...weasel,
- vernacularName: capitalize(weasel.vernacularName),
- }
- }),
-}
-```
+### Getting started
-using immutadâ—Źt-lodash:
+A fast overview of immutadâ—Źt's features is available in the [Getting started](https://github.com/Zenika/immutadot/blob/master/docs/GETTING_STARTED.md) guide.
-```js
-import { capitalize } from 'immutadot-lodash'
-const newAnimals = capitalize(animals, 'weasels[:].vernacularName')
-```
+### API
-### List notation
+The detailed API documentations of the different packages are available here:
+- [immutadot](https://zenika.github.io/immutadot/immutadot)
+- [immutadot-lodash](https://zenika.github.io/immutadot/immutadot-lodash/)
-The list notation lets you iterate over the keys of objects used as collection or map to apply operations.
+Looking for older versions API documentation? Links are available [here](https://github.com/Zenika/immutadot/blob/master/docs/README.md).
-```js
-toggle({Â nested: { prop: { 1: { active: true }, 2: { active: false } } } }, 'nested.prop.{*}.active')
-// {Â nested: { prop: { 1: { active: false }, 2: { active: true }] } }
+### Migrating from 0.x versions
-toLowerCase({Â nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'Hi' }, 3: { msg: 'Good morning' } } } }, 'nested.prop{2, 3}.msg')
-// {Â nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'hi' }, 3: { msg: 'good morning' } } } }
-```
+If you were using a version of immutadâ—Źt previous to 1.0, check out the [migrating guide](docs/MIGRATING_TO_1_0.md).
## Performances
@@ -218,19 +126,35 @@ Update large todos list (100000 items):
immutadâ—Źt 1.0.0: ~23ops/s (44.15ms/op) on 500ops
```
-## Documentation
+## Immutability
-### Getting started
+In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
-A fast overview of immutadâ—Źt's features is available in the [Getting started](https://github.com/Zenika/immutadot/blob/master/docs/GETTING_STARTED.md) guide.
+An immutable object is an object that cannot be changed once created. It brings several benefits[1](#notes) :
-### API
+- Data changes detection made simple (Shallow comparison)
+- Memoization
+- Improve rendering performances
+- Explicit data changes
+- Avoid side effects
-The detailed API documentations of the different packages are available here:
-- [immutadot](https://zenika.github.io/immutadot/immutadot)
-- [immutadot-lodash](https://zenika.github.io/immutadot/immutadot-lodash/)
+## Our approach
-Looking for older versions API documentation? Links are available [here](https://github.com/Zenika/immutadot/blob/master/docs/README.md).
+### Concise
+
+[ES2015+](https://mdn.io/JavaScript/Reference) new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
+
+### Interoperability
+
+immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
+
+### Exhaustive and yet extensible
+
+immutadâ—Źt comes with a large set of built-in utilities, mostly based on [ES2015+](https://mdn.io/JavaScript/Reference). You can also find a package called [immutadot-lodash](https://github.com/Zenika/immutadot/tree/master/packages/immutadot-lodash) with some of [lodash](https://lodash.com/)'s utilities. You haven't found what you're looking for? Do it yourself with the [`convert`](https://zenika.github.io/immutadot/immutadot/1.0/core.html#.convert) feature.
+
+### Learning curve
+
+If you are already familiar with [ES2015+](https://mdn.io/JavaScript/Reference) and [lodash](https://lodash.com/) then you should be able to use immutadâ—Źt quickly.
## Contributing
diff --git a/dist/immutadot-lodash.js b/dist/immutadot-lodash.js
index 83168abc..e65ab13e 100644
--- a/dist/immutadot-lodash.js
+++ b/dist/immutadot-lodash.js
@@ -16,7 +16,7 @@
* @see {@link https://lodash.com/docs#difference|lodash.difference} for more information.
* @since 1.0.0
*/
-var difference$1 = immutadot.convert(lodash.difference);
+var difference = immutadot.convert(lodash.difference);
/**
* This method is like {@link array.difference} except that it uses iteratee
to generate the value to be compared for each element.
@@ -31,7 +31,7 @@ var difference$1 = immutadot.convert(lodash.difference);
* @see {@link https://lodash.com/docs#differenceBy|lodash.differenceBy} for more information.
* @since 1.0.0
*/
-var differenceBy$1 = immutadot.convert(lodash.differenceBy);
+var differenceBy = immutadot.convert(lodash.differenceBy);
/**
* This method is like {@link array.difference} except that it uses comparator
to compare elements of the former array to values
.
@@ -46,7 +46,7 @@ var differenceBy$1 = immutadot.convert(lodash.differenceBy);
* @see {@link https://lodash.com/docs#differenceWith|lodash.differenceWith} for more information.
* @since 1.0.0
*/
-var differenceWith$1 = immutadot.convert(lodash.differenceWith);
+var differenceWith = immutadot.convert(lodash.differenceWith);
/**
* Replaces an array dropping one or several elements at the start of the former array.
@@ -60,7 +60,7 @@ var differenceWith$1 = immutadot.convert(lodash.differenceWith);
* @see {@link https://lodash.com/docs#drop|lodash.drop} for more information.
* @since 1.0.0
*/
-var drop$1 = immutadot.convert(lodash.drop);
+var drop = immutadot.convert(lodash.drop);
/**
* Replaces an array dropping one or several elements at the end of the former array.
@@ -74,7 +74,7 @@ var drop$1 = immutadot.convert(lodash.drop);
* @see {@link https://lodash.com/docs#dropRight|lodash.dropRight} for more information.
* @since 1.0.0
*/
-var dropRight$1 = immutadot.convert(lodash.dropRight);
+var dropRight = immutadot.convert(lodash.dropRight);
/**
* Replaces an array excluding elements dropped from the end. Elements are dropped until predicate
returns falsey.
@@ -88,7 +88,7 @@ var dropRight$1 = immutadot.convert(lodash.dropRight);
* @see {@link https://lodash.com/docs#dropRightWhile|lodash.dropRightWhile} for more information.
* @since 1.0.0
*/
-var dropRightWhile$1 = immutadot.convert(lodash.dropRightWhile);
+var dropRightWhile = immutadot.convert(lodash.dropRightWhile);
/**
* Replaces an array excluding elements dropped from the beginning. Elements are dropped until predicate
returns falsey.
@@ -102,7 +102,7 @@ var dropRightWhile$1 = immutadot.convert(lodash.dropRightWhile);
* @see {@link https://lodash.com/docs#dropWhile|lodash.dropWhile} for more information.
* @since 1.0.0
*/
-var dropWhile$1 = immutadot.convert(lodash.dropWhile);
+var dropWhile = immutadot.convert(lodash.dropWhile);
/**
* Replaces by an array of unique values that are included in th former array and all given arrays.
@@ -116,7 +116,7 @@ var dropWhile$1 = immutadot.convert(lodash.dropWhile);
* @see {@link https://lodash.com/docs#intersection|lodash.intersection} for more information.
* @since 1.0.0
*/
-var intersection$1 = immutadot.convert(lodash.intersection);
+var intersection = immutadot.convert(lodash.intersection);
/**
* This method is like {@link array.intersection} except that it uses iteratee
to generate the value to be compared for each element.
@@ -131,7 +131,7 @@ var intersection$1 = immutadot.convert(lodash.intersection);
* @see {@link https://lodash.com/docs#intersectionBy|lodash.intersectionBy} for more information.
* @since 1.0.0
*/
-var intersectionBy$1 = immutadot.convert(lodash.intersectionBy);
+var intersectionBy = immutadot.convert(lodash.intersectionBy);
/**
* This method is like {@link array.intersection} except that it uses comparator
to compare elements of the former array to arrays
.
@@ -146,7 +146,7 @@ var intersectionBy$1 = immutadot.convert(lodash.intersectionBy);
* @see {@link https://lodash.com/docs#intersectionWith|lodash.intersectionWith} for more information.
* @since 1.0.0
*/
-var intersectionWith$1 = immutadot.convert(lodash.intersectionWith);
+var intersectionWith = immutadot.convert(lodash.intersectionWith);
var lodashFpConvertOptions = {
curry: false,
@@ -190,7 +190,7 @@ var convertLodashFp = function convertLodashFp(fn) {
* @see {@link https://lodash.com/docs#pull|lodash.pull} for more information.
* @since 1.0.0
*/
-var pull$1 = convertLodashFp(fp.pull);
+var pull = convertLodashFp(fp.pull);
/**
* This method is like {@link array.pull} except that it accepts an array of values to remove.
@@ -204,7 +204,7 @@ var pull$1 = convertLodashFp(fp.pull);
* @see {@link https://lodash.com/docs#pullAll|lodash.pullAll} for more information.
* @since 1.0.0
*/
-var pullAll$1 = convertLodashFp(fp.pullAll);
+var pullAll = convertLodashFp(fp.pullAll);
/**
* This method is like {@link array.pullAll} except that it accepts iteratee
to generate the criterion by which each element is compared.
@@ -219,7 +219,7 @@ var pullAll$1 = convertLodashFp(fp.pullAll);
* @see {@link https://lodash.com/docs#pullAllBy|lodash.pullAllBy} for more information.
* @since 1.0.0
*/
-var pullAllBy$1 = convertLodashFp(fp.pullAllBy);
+var pullAllBy = convertLodashFp(fp.pullAllBy);
/**
* This method is like {@link array.pullAll} except that it accepts comparator
to compare elements.
@@ -234,7 +234,7 @@ var pullAllBy$1 = convertLodashFp(fp.pullAllBy);
* @see {@link https://lodash.com/docs#pullAllWith|lodash.pullAllWith} for more information.
* @since 1.0.0
*/
-var pullAllWith$1 = convertLodashFp(fp.pullAllWith);
+var pullAllWith = convertLodashFp(fp.pullAllWith);
/**
* Replaces an array removing the specified indexes from the former array.
@@ -248,7 +248,7 @@ var pullAllWith$1 = convertLodashFp(fp.pullAllWith);
* @see {@link https://lodash.com/docs#pullAt|lodash.pullAt} for more information.
* @since 1.0.0
*/
-var pullAt$1 = convertLodashFp(fp.pullAt);
+var pullAt = convertLodashFp(fp.pullAt);
/**
* Replaces an array removing elements that predicate returns truthy for from the former array.
@@ -262,7 +262,7 @@ var pullAt$1 = convertLodashFp(fp.pullAt);
* @see {@link https://lodash.com/docs#remove|lodash.remove} for more information.
* @since 1.0.0
*/
-var remove$1 = convertLodashFp(fp.remove);
+var remove = convertLodashFp(fp.remove);
/**
* Creates a slice of array with n
elements taken from the beginning.
@@ -276,7 +276,7 @@ var remove$1 = convertLodashFp(fp.remove);
* @see {@link https://lodash.com/docs#take|lodash.take} for more information.
* @since 1.0.0
*/
-var take$1 = immutadot.convert(lodash.take);
+var take = immutadot.convert(lodash.take);
/**
* Creates a slice of array with n
elements taken from the end.
@@ -290,7 +290,7 @@ var take$1 = immutadot.convert(lodash.take);
* @see {@link https://lodash.com/docs#takeRight|lodash.takeRight} for more information.
* @since 1.0.0
*/
-var takeRight$1 = immutadot.convert(lodash.takeRight);
+var takeRight = immutadot.convert(lodash.takeRight);
/**
* Creates a slice of array with elements taken from the end.
@@ -306,7 +306,7 @@ var takeRight$1 = immutadot.convert(lodash.takeRight);
* @see {@link https://lodash.com/docs#takeRightWhile|lodash.takeRightWhile} for more information.
* @since 1.0.0
*/
-var takeRightWhile$1 = immutadot.convert(lodash.takeRightWhile);
+var takeRightWhile = immutadot.convert(lodash.takeRightWhile);
/**
* Creates a slice of array with elements taken from the beginning.
@@ -322,7 +322,7 @@ var takeRightWhile$1 = immutadot.convert(lodash.takeRightWhile);
* @see {@link https://lodash.com/docs#takeWhile|lodash.takeWhile} for more information.
* @since 1.0.0
*/
-var takeWhile$1 = immutadot.convert(lodash.takeWhile);
+var takeWhile = immutadot.convert(lodash.takeWhile);
/**
* Replaces an array by an array of unique values, in order, from the former array and the given arrays.
@@ -336,7 +336,7 @@ var takeWhile$1 = immutadot.convert(lodash.takeWhile);
* @see {@link https://lodash.com/docs#union|lodash.union} for more information.
* @since 1.0.0
*/
-var union$1 = immutadot.convert(lodash.union);
+var union = immutadot.convert(lodash.union);
/**
* This method is like {@link array.union} except that it accepts iteratee
to generate the criterion by which elements are compared.
@@ -351,7 +351,7 @@ var union$1 = immutadot.convert(lodash.union);
* @see {@link https://lodash.com/docs#unionBy|lodash.unionBy} for more information.
* @since 1.0.0
*/
-var unionBy$1 = immutadot.convert(lodash.unionBy);
+var unionBy = immutadot.convert(lodash.unionBy);
/**
* This method is like {@link array.union} except that it accepts comparator
to compare elements.
@@ -366,7 +366,7 @@ var unionBy$1 = immutadot.convert(lodash.unionBy);
* @see {@link https://lodash.com/docs#unionWith|lodash.unionWith} for more information.
* @since 1.0.0
*/
-var unionWith$1 = immutadot.convert(lodash.unionWith);
+var unionWith = immutadot.convert(lodash.unionWith);
/**
* This method is an alias of {@link array.pull}.
@@ -374,7 +374,7 @@ var unionWith$1 = immutadot.convert(lodash.unionWith);
* @memberof array
* @since 1.0.0
*/
-var without = pull$1;
+var without = pull;
/**
* Replaces an array by the symmetric difference of the former array and the given arrays.
@@ -388,7 +388,7 @@ var without = pull$1;
* @see {@link https://lodash.com/docs#xor|lodash.xor} for more information.
* @since 1.0.0
*/
-var xor$1 = immutadot.convert(lodash.xor);
+var xor = immutadot.convert(lodash.xor);
/**
* This method is like {@link array.xor} except that it accepts iteratee
to generate the criterion by which elements are compared.
@@ -403,7 +403,7 @@ var xor$1 = immutadot.convert(lodash.xor);
* @see {@link https://lodash.com/docs#xorBy|lodash.xorBy} for more information.
* @since 1.0.0
*/
-var xorBy$1 = immutadot.convert(lodash.xorBy);
+var xorBy = immutadot.convert(lodash.xorBy);
/**
* This method is like {@link array.xor} except that it accepts comparator
to compare elements.
@@ -418,7 +418,7 @@ var xorBy$1 = immutadot.convert(lodash.xorBy);
* @see {@link https://lodash.com/docs#xorWith|lodash.xorWith} for more information.
* @since 1.0.0
*/
-var xorWith$1 = immutadot.convert(lodash.xorWith);
+var xorWith = immutadot.convert(lodash.xorWith);
/**
* Replaces by an array of elements predicate
returns truthy for.
@@ -432,7 +432,7 @@ var xorWith$1 = immutadot.convert(lodash.xorWith);
* @example filter({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v % 2) // => { nested: { prop: [1, 3] } }
* @since 1.0.0
*/
-var filter$1 = immutadot.convert(lodash.filter);
+var filter = immutadot.convert(lodash.filter);
/**
* Replaces by an array of values by running each element in the former collection thru iteratee.
@@ -447,7 +447,7 @@ var filter$1 = immutadot.convert(lodash.filter);
* @example map({ nested: { prop: [1, 2, 3] } }, 'nested.prop', v => v * 2) // => { nested: { prop: [2, 4, 6] } }
* @since 1.0.0
*/
-var map$1 = immutadot.convert(lodash.map);
+var map = immutadot.convert(lodash.map);
/**
* Replaces by an array of sorted by iteratees
in specified orders
.
@@ -464,7 +464,7 @@ var map$1 = immutadot.convert(lodash.map);
* // => { nested: { prop: [{ name: 'Nico', age: 666 }, { name: 'Nico', age: 30 }, { name: 'Yvo', age: 2 }] } }
* @since 1.0.0
*/
-var orderBy$1 = immutadot.convert(lodash.orderBy);
+var orderBy = immutadot.convert(lodash.orderBy);
/**
* Replaces by an array of elements predicate
returns falsy for.
@@ -478,7 +478,7 @@ var orderBy$1 = immutadot.convert(lodash.orderBy);
* @example reject({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v % 2) // => { nested: { prop: [2, 4] } }
* @since 1.0.0
*/
-var reject$1 = immutadot.convert(lodash.reject);
+var reject = immutadot.convert(lodash.reject);
/**
* Replaces by an array of shuffled elements.
@@ -491,7 +491,7 @@ var reject$1 = immutadot.convert(lodash.reject);
* @example shuffle({ nested: { prop: [1, 2, 3, 4, 5, 6, 7, 8, 9] } }, 'nested.prop') // => { nested: { prop: [7, 3, 9, 1, 4, 5, 6, 8, 2] } }
* @since 1.0.0
*/
-var shuffle$1 = immutadot.convert(lodash.shuffle);
+var shuffle = immutadot.convert(lodash.shuffle);
/**
* Replaces by an array of sorted by iteratees
.
@@ -507,7 +507,7 @@ var shuffle$1 = immutadot.convert(lodash.shuffle);
* // => { nested: { prop: [{ name: 'Nico', age: 30 }, { name: 'Nico', age: 666 }, { name: 'Yvo', age: 2 }] } }
* @since 1.0.0
*/
-var sortBy$1 = immutadot.convert(lodash.sortBy);
+var sortBy = immutadot.convert(lodash.sortBy);
/**
* Replaces by an object assigning own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that resolve to undefined
.
@@ -522,7 +522,7 @@ var sortBy$1 = immutadot.convert(lodash.sortBy);
* @see {@link https://lodash.com/docs#defaults|lodash.defaults} for more information.
* @since 1.0.0
*/
-var defaults$1 = convertLodashFp(fp.defaults);
+var defaults = convertLodashFp(fp.defaults);
/**
* Replaces by an object with the same values as the former object and values generated by running each own enumerable string keyed property of the former object thru iteratee
.
@@ -537,7 +537,7 @@ var defaults$1 = convertLodashFp(fp.defaults);
* @see {@link https://lodash.com/docs#mapKeys|lodash.mapKeys} for more information.
* @since 1.0.0
*/
-var mapKeys$1 = immutadot.convert(lodash.mapKeys);
+var mapKeys = immutadot.convert(lodash.mapKeys);
/**
* Replaces by an object with the same keys as the former object and values generated by running each own enumerable string keyed property of object thru iteratee
.
@@ -553,7 +553,7 @@ var mapKeys$1 = immutadot.convert(lodash.mapKeys);
* @see {@link https://lodash.com/docs#mapValues|lodash.mapValues} for more information.
* @since 1.0.0
*/
-var mapValues$1 = immutadot.convert(lodash.mapValues);
+var mapValues = immutadot.convert(lodash.mapValues);
/**
* Replaces by an object deeply merging own enumerable string keyed properties of source objects to the former object.
@@ -568,7 +568,7 @@ var mapValues$1 = immutadot.convert(lodash.mapValues);
* @see {@link https://lodash.com/docs#merge|lodash.merge} for more information.
* @since 1.0.0
*/
-var merge$1 = convertLodashFp(fp.merge);
+var merge = convertLodashFp(fp.merge);
/**
* Replaces by an object omitting specified properties.
@@ -582,7 +582,7 @@ var merge$1 = convertLodashFp(fp.merge);
* @see {@link https://lodash.com/docs#omit|lodash.omit} for more information.
* @since 1.0.0
*/
-var omit$1 = immutadot.convert(lodash.omit);
+var omit = immutadot.convert(lodash.omit);
/**
* Replaces by an object omitting properties that predicate
doesn't return truthy for.
@@ -596,7 +596,7 @@ var omit$1 = immutadot.convert(lodash.omit);
* @see {@link https://lodash.com/docs#omitBy|lodash.omitBy} for more information.
* @since 1.0.0
*/
-var omitBy$1 = immutadot.convert(lodash.omitBy);
+var omitBy = immutadot.convert(lodash.omitBy);
/**
* Replaces by an object picking specified properties.
@@ -610,7 +610,7 @@ var omitBy$1 = immutadot.convert(lodash.omitBy);
* @see {@link https://lodash.com/docs#pick|lodash.pick} for more information.
* @since 1.0.0
*/
-var pick$1 = immutadot.convert(lodash.pick);
+var pick = immutadot.convert(lodash.pick);
/**
* Replaces by an object picking properties that predicate
returns truthy for.
@@ -624,7 +624,7 @@ var pick$1 = immutadot.convert(lodash.pick);
* @see {@link https://lodash.com/docs#pickBy|lodash.pickBy} for more information.
* @since 1.0.0
*/
-var pickBy$1 = immutadot.convert(lodash.pickBy);
+var pickBy = immutadot.convert(lodash.pickBy);
/**
* Converts the first character of string to upper case and the remaining to lower case.
@@ -637,7 +637,7 @@ var pickBy$1 = immutadot.convert(lodash.pickBy);
* @see {@link https://lodash.com/docs#capitalize|lodash.capitalize} for more information.
* @since 1.0.0
*/
-var capitalize$1 = immutadot.convert(lodash.capitalize);
+var capitalize = immutadot.convert(lodash.capitalize);
/**
* Converts string, as a whole, to lower case just like String#toLowerCase.
@@ -651,7 +651,7 @@ var capitalize$1 = immutadot.convert(lodash.capitalize);
* @see {@link https://mdn.io/String/toLowerCase|String.toLowerCase} for more information.
* @since 1.0.0
*/
-var toLower$1 = immutadot.convert(lodash.toLower);
+var toLower = immutadot.convert(lodash.toLower);
/**
* Converts string, as a whole, to upper case just like String#toUpperCase.
@@ -665,52 +665,52 @@ var toLower$1 = immutadot.convert(lodash.toLower);
* @see {@link https://mdn.io/String/toUpperCase|String.toUpperCase} for more information.
* @since 1.0.0
*/
-var toUpper$1 = immutadot.convert(lodash.toUpper);
-
-exports.difference = difference$1;
-exports.differenceBy = differenceBy$1;
-exports.differenceWith = differenceWith$1;
-exports.drop = drop$1;
-exports.dropRight = dropRight$1;
-exports.dropRightWhile = dropRightWhile$1;
-exports.dropWhile = dropWhile$1;
-exports.intersection = intersection$1;
-exports.intersectionBy = intersectionBy$1;
-exports.intersectionWith = intersectionWith$1;
-exports.pull = pull$1;
-exports.pullAll = pullAll$1;
-exports.pullAllBy = pullAllBy$1;
-exports.pullAllWith = pullAllWith$1;
-exports.pullAt = pullAt$1;
-exports.remove = remove$1;
-exports.take = take$1;
-exports.takeRight = takeRight$1;
-exports.takeRightWhile = takeRightWhile$1;
-exports.takeWhile = takeWhile$1;
-exports.union = union$1;
-exports.unionBy = unionBy$1;
-exports.unionWith = unionWith$1;
+var toUpper = immutadot.convert(lodash.toUpper);
+
+exports.difference = difference;
+exports.differenceBy = differenceBy;
+exports.differenceWith = differenceWith;
+exports.drop = drop;
+exports.dropRight = dropRight;
+exports.dropRightWhile = dropRightWhile;
+exports.dropWhile = dropWhile;
+exports.intersection = intersection;
+exports.intersectionBy = intersectionBy;
+exports.intersectionWith = intersectionWith;
+exports.pull = pull;
+exports.pullAll = pullAll;
+exports.pullAllBy = pullAllBy;
+exports.pullAllWith = pullAllWith;
+exports.pullAt = pullAt;
+exports.remove = remove;
+exports.take = take;
+exports.takeRight = takeRight;
+exports.takeRightWhile = takeRightWhile;
+exports.takeWhile = takeWhile;
+exports.union = union;
+exports.unionBy = unionBy;
+exports.unionWith = unionWith;
exports.without = without;
-exports.xor = xor$1;
-exports.xorBy = xorBy$1;
-exports.xorWith = xorWith$1;
-exports.filter = filter$1;
-exports.map = map$1;
-exports.orderBy = orderBy$1;
-exports.reject = reject$1;
-exports.shuffle = shuffle$1;
-exports.sortBy = sortBy$1;
-exports.defaults = defaults$1;
-exports.mapKeys = mapKeys$1;
-exports.mapValues = mapValues$1;
-exports.merge = merge$1;
-exports.omit = omit$1;
-exports.omitBy = omitBy$1;
-exports.pick = pick$1;
-exports.pickBy = pickBy$1;
-exports.capitalize = capitalize$1;
-exports.toLower = toLower$1;
-exports.toUpper = toUpper$1;
+exports.xor = xor;
+exports.xorBy = xorBy;
+exports.xorWith = xorWith;
+exports.filter = filter;
+exports.map = map;
+exports.orderBy = orderBy;
+exports.reject = reject;
+exports.shuffle = shuffle;
+exports.sortBy = sortBy;
+exports.defaults = defaults;
+exports.mapKeys = mapKeys;
+exports.mapValues = mapValues;
+exports.merge = merge;
+exports.omit = omit;
+exports.omitBy = omitBy;
+exports.pick = pick;
+exports.pickBy = pickBy;
+exports.capitalize = capitalize;
+exports.toLower = toLower;
+exports.toUpper = toUpper;
Object.defineProperty(exports, '__esModule', { value: true });
diff --git a/dist/immutadot.js b/dist/immutadot.js
index 3f839c94..b0761fbc 100644
--- a/dist/immutadot.js
+++ b/dist/immutadot.js
@@ -302,21 +302,21 @@ var _uid = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
-var shared = _shared('keys');
+var shared$1 = _shared('keys');
var _sharedKey = function (key) {
- return shared[key] || (shared[key] = _uid(key));
+ return shared$1[key] || (shared$1[key] = _uid(key));
};
var arrayIndexOf = _arrayIncludes(false);
-var IE_PROTO$1 = _sharedKey('IE_PROTO');
+var IE_PROTO = _sharedKey('IE_PROTO');
var _objectKeysInternal = function (object, names) {
var O = _toIobject(object);
var i = 0;
var result = [];
var key;
- for (key in O) if (key != IE_PROTO$1) _has(O, key) && result.push(key);
+ for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (_has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
@@ -354,7 +354,7 @@ var _html = document$1 && document$1.documentElement;
-var IE_PROTO = _sharedKey('IE_PROTO');
+var IE_PROTO$1 = _sharedKey('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE$1 = 'prototype';
@@ -387,7 +387,7 @@ var _objectCreate = Object.create || function create(O, Properties) {
result = new Empty();
Empty[PROTOTYPE$1] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
+ result[IE_PROTO$1] = O;
} else result = createDict();
return Properties === undefined ? result : _objectDps(result, Properties);
};
@@ -632,20 +632,20 @@ _export(_export.S + _export.F * !_iterDetect(function (iter) { }), 'Array', {
}
});
-var from$2 = _core.Array.from;
+var from = _core.Array.from;
-var from = createCommonjsModule(function (module) {
-module.exports = { "default": from$2, __esModule: true };
+var from$2 = createCommonjsModule(function (module) {
+module.exports = { "default": from, __esModule: true };
});
-unwrapExports(from);
+unwrapExports(from$2);
var toConsumableArray = createCommonjsModule(function (module, exports) {
exports.__esModule = true;
-var _from2 = _interopRequireDefault(from);
+var _from2 = _interopRequireDefault(from$2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -715,13 +715,13 @@ var core_getIterator = _core.getIterator = function (it) {
return _anObject(iterFn.call(it));
};
-var getIterator$1 = core_getIterator;
+var getIterator = core_getIterator;
-var getIterator = createCommonjsModule(function (module) {
-module.exports = { "default": getIterator$1, __esModule: true };
+var getIterator$2 = createCommonjsModule(function (module) {
+module.exports = { "default": getIterator, __esModule: true };
});
-var _getIterator = unwrapExports(getIterator);
+var _getIterator = unwrapExports(getIterator$2);
// most Object methods by ES6 should accept primitives
@@ -744,13 +744,13 @@ _objectSap('keys', function () {
};
});
-var keys$1 = _core.Object.keys;
+var keys = _core.Object.keys;
-var keys = createCommonjsModule(function (module) {
-module.exports = { "default": keys$1, __esModule: true };
+var keys$2 = createCommonjsModule(function (module) {
+module.exports = { "default": keys, __esModule: true };
});
-var _Object$keys = unwrapExports(keys);
+var _Object$keys = unwrapExports(keys$2);
var ITERATOR$4 = _wks('iterator');
@@ -762,24 +762,24 @@ var core_isIterable = _core.isIterable = function (it) {
|| _iterators.hasOwnProperty(_classof(O));
};
-var isIterable$2 = core_isIterable;
+var isIterable = core_isIterable;
-var isIterable = createCommonjsModule(function (module) {
-module.exports = { "default": isIterable$2, __esModule: true };
+var isIterable$2 = createCommonjsModule(function (module) {
+module.exports = { "default": isIterable, __esModule: true };
});
-unwrapExports(isIterable);
+unwrapExports(isIterable$2);
var slicedToArray = createCommonjsModule(function (module, exports) {
exports.__esModule = true;
-var _isIterable3 = _interopRequireDefault(isIterable);
+var _isIterable3 = _interopRequireDefault(isIterable$2);
-var _getIterator3 = _interopRequireDefault(getIterator);
+var _getIterator3 = _interopRequireDefault(getIterator$2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -824,12 +824,12 @@ exports.default = function () {
var _slicedToArray = unwrapExports(slicedToArray);
-var toArray$1 = createCommonjsModule(function (module, exports) {
+var toArray = createCommonjsModule(function (module, exports) {
exports.__esModule = true;
-var _from2 = _interopRequireDefault(from);
+var _from2 = _interopRequireDefault(from$2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -838,7 +838,7 @@ exports.default = function (arr) {
};
});
-var _toArray = unwrapExports(toArray$1);
+var _toArray = unwrapExports(toArray);
var f$1 = Object.getOwnPropertySymbols;
@@ -891,20 +891,20 @@ var _objectAssign = !$assign || _fails(function () {
_export(_export.S + _export.F, 'Object', { assign: _objectAssign });
-var assign$1 = _core.Object.assign;
+var assign = _core.Object.assign;
-var assign = createCommonjsModule(function (module) {
-module.exports = { "default": assign$1, __esModule: true };
+var assign$2 = createCommonjsModule(function (module) {
+module.exports = { "default": assign, __esModule: true };
});
-var _Object$assign = unwrapExports(assign);
+var _Object$assign = unwrapExports(assign$2);
var _extends = createCommonjsModule(function (module, exports) {
exports.__esModule = true;
-var _assign2 = _interopRequireDefault(assign);
+var _assign2 = _interopRequireDefault(assign$2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1025,17 +1025,17 @@ var _isArray = Array.isArray || function isArray(arg) {
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
-var f$5 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return _objectKeysInternal(O, hiddenKeys);
};
var _objectGopn = {
- f: f$5
+ f: f$4
};
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var gOPN$1 = _objectGopn.f;
+var gOPN = _objectGopn.f;
var toString$1 = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
@@ -1043,27 +1043,27 @@ var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNa
var getWindowNames = function (it) {
try {
- return gOPN$1(it);
+ return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
-var f$4 = function getOwnPropertyNames(it) {
- return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN$1(_toIobject(it));
+var f$5 = function getOwnPropertyNames(it) {
+ return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it));
};
var _objectGopnExt = {
- f: f$4
+ f: f$5
};
-var gOPD$1 = Object.getOwnPropertyDescriptor;
+var gOPD = Object.getOwnPropertyDescriptor;
-var f$6 = _descriptors ? gOPD$1 : function getOwnPropertyDescriptor(O, P) {
+var f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = _toIobject(O);
P = _toPrimitive(P, true);
if (_ie8DomDefine) try {
- return gOPD$1(O, P);
+ return gOPD(O, P);
} catch (e) { /* empty */ }
if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);
};
@@ -1097,9 +1097,9 @@ var META = _meta.KEY;
-var gOPD = _objectGopd.f;
+var gOPD$1 = _objectGopd.f;
var dP$1 = _objectDp.f;
-var gOPN = _objectGopnExt.f;
+var gOPN$1 = _objectGopnExt.f;
var $Symbol = _global.Symbol;
var $JSON = _global.JSON;
var _stringify = $JSON && $JSON.stringify;
@@ -1122,7 +1122,7 @@ var setSymbolDesc = _descriptors && _fails(function () {
get: function () { return dP$1(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
- var protoDesc = gOPD(ObjectProto$1, key);
+ var protoDesc = gOPD$1(ObjectProto$1, key);
if (protoDesc) delete ObjectProto$1[key];
dP$1(it, key, D);
if (protoDesc && it !== ObjectProto$1) dP$1(ObjectProto$1, key, protoDesc);
@@ -1176,12 +1176,12 @@ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = _toIobject(it);
key = _toPrimitive(key, true);
if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;
- var D = gOPD(it, key);
+ var D = gOPD$1(it, key);
if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
- var names = gOPN(_toIobject(it));
+ var names = gOPN$1(_toIobject(it));
var result = [];
var i = 0;
var key;
@@ -1191,7 +1191,7 @@ var $getOwnPropertyNames = function getOwnPropertyNames(it) {
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto$1;
- var names = gOPN(IS_OP ? OPSymbols : _toIobject(it));
+ var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it));
var result = [];
var i = 0;
var key;
@@ -1310,13 +1310,13 @@ _wksDefine('asyncIterator');
_wksDefine('observable');
-var symbol$1 = _core.Symbol;
+var symbol = _core.Symbol;
-var symbol = createCommonjsModule(function (module) {
-module.exports = { "default": symbol$1, __esModule: true };
+var symbol$2 = createCommonjsModule(function (module) {
+module.exports = { "default": symbol, __esModule: true };
});
-var _Symbol = unwrapExports(symbol);
+var _Symbol = unwrapExports(symbol$2);
var allProps = _Symbol('allProps');
var index = _Symbol('index');
@@ -1342,32 +1342,32 @@ _export(_export.S, 'Number', {
}
});
-var isSafeInteger$1 = _core.Number.isSafeInteger;
+var isSafeInteger = _core.Number.isSafeInteger;
-var isSafeInteger = createCommonjsModule(function (module) {
-module.exports = { "default": isSafeInteger$1, __esModule: true };
+var isSafeInteger$2 = createCommonjsModule(function (module) {
+module.exports = { "default": isSafeInteger, __esModule: true };
});
-var _Number$isSafeInteger = unwrapExports(isSafeInteger);
+var _Number$isSafeInteger = unwrapExports(isSafeInteger$2);
-var iterator$2 = _wksExt.f('iterator');
+var iterator = _wksExt.f('iterator');
-var iterator = createCommonjsModule(function (module) {
-module.exports = { "default": iterator$2, __esModule: true };
+var iterator$2 = createCommonjsModule(function (module) {
+module.exports = { "default": iterator, __esModule: true };
});
-unwrapExports(iterator);
+unwrapExports(iterator$2);
var _typeof_1 = createCommonjsModule(function (module, exports) {
exports.__esModule = true;
-var _iterator2 = _interopRequireDefault(iterator);
+var _iterator2 = _interopRequireDefault(iterator$2);
-var _symbol2 = _interopRequireDefault(symbol);
+var _symbol2 = _interopRequireDefault(symbol$2);
var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
@@ -1938,13 +1938,13 @@ var _setCollectionFrom = function (COLLECTION) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
_setCollectionFrom('Map');
-var map$1 = _core.Map;
+var map = _core.Map;
-var map = createCommonjsModule(function (module) {
-module.exports = { "default": map$1, __esModule: true };
+var map$2 = createCommonjsModule(function (module) {
+module.exports = { "default": map, __esModule: true };
});
-var _Map = unwrapExports(map);
+var _Map = unwrapExports(map$2);
var runtime = createCommonjsModule(function (module) {
/**
@@ -2749,7 +2749,7 @@ var regexp = function regexp(_regexp) {
* @private
* @since 1.0.0
*/
-var filter$1 = function filter(parser, predicate) {
+var filter = function filter(parser, predicate) {
return function (str) {
return maybeMap(parser(str), function (parsed) {
return predicate(parsed) ? parsed : null;
@@ -2851,25 +2851,6 @@ var isSliceIndexString = function isSliceIndexString(arg) {
return isSliceIndex(arg ? Number(arg) : undefined);
};
-/**
- * Wraps fn
allowing to call it with an array instead of a string.
- * The returned function behaviour is :
- * - If called with an array, returns a copy of the array with values converted to path keys
- * - Otherwise, calls fn
with the string representation of its argument
- * @function
- * @param {function} fn The function to wrap
- * @returns {function} The wrapper function
- * @memberof path
- * @private
- * @since 1.0.0
- */
-var allowingArrays = function allowingArrays(fn) {
- return function (arg) {
- if (Array.isArray(arg)) return arg;
- return fn(arg);
- };
-};
-
var emptyStringParser = function emptyStringParser(str) {
return str.length === 0 ? [] : null;
};
@@ -2880,7 +2861,7 @@ var quotedBracketNotationParser = map$3(regexp(/^\[(['"])(.*?[^\\])\1\]?\.?(.*)$
property = _ref2[1],
rest = _ref2[2];
- return [[prop, unescapeQuotes(property, quote)]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[prop, unescapeQuotes(property, quote)]].concat(_toConsumableArray(applyParsers(rest)));
});
var incompleteQuotedBracketNotationParser = map$3(regexp(/^(\[["'][^.[{]*)\.?(.*)$/), function (_ref3) {
@@ -2888,7 +2869,7 @@ var incompleteQuotedBracketNotationParser = map$3(regexp(/^(\[["'][^.[{]*)\.?(.*
beforeNewSegment = _ref4[0],
rest = _ref4[1];
- return [[prop, beforeNewSegment]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[prop, beforeNewSegment]].concat(_toConsumableArray(applyParsers(rest)));
});
var bareBracketNotationParser = map$3(regexp(/^\[([^\]]*)\]\.?(.*)$/), function (_ref5) {
@@ -2896,7 +2877,7 @@ var bareBracketNotationParser = map$3(regexp(/^\[([^\]]*)\]\.?(.*)$/), function
property = _ref6[0],
rest = _ref6[1];
- return isIndex(Number(property)) ? [[index, Number(property)]].concat(_toConsumableArray(stringToPath(rest))) : [[prop, property]].concat(_toConsumableArray(stringToPath(rest)));
+ return isIndex(Number(property)) ? [[index, Number(property)]].concat(_toConsumableArray(applyParsers(rest))) : [[prop, property]].concat(_toConsumableArray(applyParsers(rest)));
});
var incompleteBareBracketNotationParser = map$3(regexp(/^(\[[^.[{]*)\.?(.*)$/), function (_ref7) {
@@ -2904,10 +2885,10 @@ var incompleteBareBracketNotationParser = map$3(regexp(/^(\[[^.[{]*)\.?(.*)$/),
beforeNewSegment = _ref8[0],
rest = _ref8[1];
- return [[prop, beforeNewSegment]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[prop, beforeNewSegment]].concat(_toConsumableArray(applyParsers(rest)));
});
-var sliceNotationParser = map$3(filter$1(regexp(/^\[([^:\]]*):([^:\]]*)\]\.?(.*)$/), function (_ref9) {
+var sliceNotationParser = map$3(filter(regexp(/^\[([^:\]]*):([^:\]]*)\]\.?(.*)$/), function (_ref9) {
var _ref10 = _slicedToArray(_ref9, 2),
sliceStart = _ref10[0],
sliceEnd = _ref10[1];
@@ -2919,14 +2900,14 @@ var sliceNotationParser = map$3(filter$1(regexp(/^\[([^:\]]*):([^:\]]*)\]\.?(.*)
sliceEnd = _ref12[1],
rest = _ref12[2];
- return [[slice, [toSliceIndex(sliceStart, 0), toSliceIndex(sliceEnd)]]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[slice, [toSliceIndex(sliceStart, 0), toSliceIndex(sliceEnd)]]].concat(_toConsumableArray(applyParsers(rest)));
});
var listWildCardParser = map$3(regexp(/^{\*}\.?(.*)$/), function (_ref13) {
var _ref14 = _slicedToArray(_ref13, 1),
rest = _ref14[0];
- return [[allProps]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[allProps]].concat(_toConsumableArray(applyParsers(rest)));
});
var listPropRegexp = /^,?((?!["'])([^,]*)|(["'])(.*?[^\\])\3)(.*)/;
@@ -2977,7 +2958,7 @@ var listNotationParser = map$3(regexp(/^\{(((?!["'])[^,}]*|(["']).*?[^\\]\2)(,((
rest = _ref16[6];
var props = [].concat(_toConsumableArray(extractListProps(rawProps)));
- return props.length === 1 ? [[prop, props[0]]].concat(_toConsumableArray(stringToPath(rest))) : [[list, props]].concat(_toConsumableArray(stringToPath(rest)));
+ return props.length === 1 ? [[prop, props[0]]].concat(_toConsumableArray(applyParsers(rest))) : [[list, props]].concat(_toConsumableArray(applyParsers(rest)));
});
var incompleteListNotationParser = map$3(regexp(/^(\{[^.[{]*)\.?(.*)$/), function (_ref17) {
@@ -2985,7 +2966,7 @@ var incompleteListNotationParser = map$3(regexp(/^(\{[^.[{]*)\.?(.*)$/), functio
beforeNewSegment = _ref18[0],
rest = _ref18[1];
- return [[prop, beforeNewSegment]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[prop, beforeNewSegment]].concat(_toConsumableArray(applyParsers(rest)));
});
var pathSegmentEndedByNewSegment = map$3(regexp(/^([^.[{]*)\.?([[{]?.*)$/), function (_ref19) {
@@ -2993,34 +2974,28 @@ var pathSegmentEndedByNewSegment = map$3(regexp(/^([^.[{]*)\.?([[{]?.*)$/), func
beforeNewSegment = _ref20[0],
rest = _ref20[1];
- return [[prop, beforeNewSegment]].concat(_toConsumableArray(stringToPath(rest)));
+ return [[prop, beforeNewSegment]].concat(_toConsumableArray(applyParsers(rest)));
});
var applyParsers = race([emptyStringParser, quotedBracketNotationParser, incompleteQuotedBracketNotationParser, sliceNotationParser, bareBracketNotationParser, incompleteBareBracketNotationParser, listWildCardParser, listNotationParser, incompleteListNotationParser, pathSegmentEndedByNewSegment]);
-/**
- * Converts arg
to a path represented as an array of keys.
- * @function
- * @param {*} arg The value to convert
- * @returns {Array} The path represented as an array of keys
- * @memberof path
- * @private
- * @since 1.0.0
- */
-var stringToPath = function stringToPath(arg) {
- if (isNil(arg)) return [];
- return applyParsers(toString$2(arg));
-};
-
var MAX_CACHE_SIZE = 1000;
var cache = new _Map();
+var stringToPath = function stringToPath(pStr) {
+ var str = pStr.startsWith('.') ? pStr.substring(1) : pStr;
+
+ var path = applyParsers(str);
+
+ return pStr.endsWith('.') ? [].concat(_toConsumableArray(path), [[prop, '']]) : path;
+};
+
/**
- * Memoized version of {@link core.stringToPath}.
+ * Memoized version of {@link path.stringToPath}.
* The cache has a maximum size of 1000, when overflowing the cache is cleared.
* @function
* @param {string} str The string to convert
- * @returns {Array} The path represented as an array of keys
+ * @returns {Array>} The path represented as an array of keys
* @memberof path
* @private
* @since 1.0.0
@@ -3037,15 +3012,23 @@ var memoizedStringToPath = function memoizedStringToPath(str) {
};
/**
- * This method is like {@link core.toPath} except it returns memoized arrays which must not be mutated.
+ * Converts arg
to a path represented as an array of keys.
+ * arg
may be a string, in which case it will be parsed.
+ * It may also be an Array, in which case a copy of the array with values converted to path keys will be returned.
+ * If arg
is neither a string nor an Array, its string representation will be parsed.
* @function
* @param {string|Array|*} arg The value to convert
- * @returns {Array>} The path represented as an array of keys
+ * @returns {Array>} The path represented as an array of keys
* @memberof path
* @since 1.0.0
+ * @example toPath('a.b[1]["."][1:-1]') // => [[prop, 'a'], [prop, 'b'], [index, 1], [prop, '.'], [slice, [1, -1]]]
* @private
*/
-var unsafeToPath = allowingArrays(memoizedStringToPath);
+var toPath = function toPath(arg) {
+ if (isNil(arg)) return [];
+
+ return memoizedStringToPath(toString$2(arg));
+};
/**
* Makes a copy of value.
@@ -3120,7 +3103,7 @@ var apply = function apply(operation) {
args[_key - 1] = arguments[_key];
}
- var path = unsafeToPath(pPath);
+ var path = toPath(pPath);
if (path.length === 0) throw new TypeError('path should not be empty');
@@ -3161,7 +3144,7 @@ var apply = function apply(operation) {
var _newObj = copy(curObj, false);
var _noop2 = true;
- var listProps = allProps ? _Object$keys(_newObj) : propValue;
+ var listProps = propType === allProps ? _Object$keys(_newObj) : propValue;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
@@ -3277,7 +3260,7 @@ var convert = function convert(updater) {
return apply(makeOperation(updater));
};
-var toArray = function toArray(array) {
+var toArray$1 = function toArray(array) {
if (isNil(array)) return [];
if (Array.isArray(array)) return array;
return [array];
@@ -3311,7 +3294,7 @@ var callMethodReturnArray = function callMethodReturnArray(array, method, args)
var convertArrayMethod = function convertArrayMethod(method) {
var mutating = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
- var getArray = mutating ? toArrayCopy : toArray;
+ var getArray = mutating ? toArrayCopy : toArray$1;
var callMethod = mutating ? callMethodReturnArray : callMethodReturnResult;
return convert(function (value) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -3334,7 +3317,7 @@ var convertArrayMethod = function convertArrayMethod(method) {
* @see {@link https://mdn.io/Array.prototype.filter|Array.prototype.filter} for more information.
* @since 1.0.0
*/
-var filter = convertArrayMethod('filter', false);
+var filter$1 = convertArrayMethod('filter', false);
/**
* Replaces an array concatenating the former array with additional arrays and/or values.
@@ -3595,7 +3578,7 @@ function get(obj, path, defaultValue) {
return walkPath(curObj[prop$$1], pathRest);
}
- var parsedPath = unsafeToPath(path);
+ var parsedPath = toPath(path);
if (parsedPath.some(function (_ref) {
var _ref2 = _slicedToArray(_ref, 1),
propType = _ref2[0];
@@ -3687,6 +3670,28 @@ var add = convert(function (value, addition) {
return Number(value) + Number(addition);
});
+/**
+ * Applies &&
between the former value and args
+ * @function
+ * @memberof lang
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {...*} [args] Other operands.
+ * @return {Object} Returns the updated object.
+ * @example and({ nested: { prop: true } }, 'nested.prop', true) // { nested: { prop: true } }
+ * @example and({ nested: { prop: true } }, 'nested.prop', true, false) // { nested: { prop: false } }
+ * @since 1.0.0
+ */
+var and = convert(function (v) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ return args.reduce(function (acc, arg) {
+ return acc && arg;
+ }, v);
+});
+
/**
* Replaces by the division of the former number and the given number.
* @function
@@ -3717,6 +3722,28 @@ var multiply = convert(function (value, multiplier) {
return Number(value) * Number(multiplier);
});
+/**
+ * Applies ||
between the former value and args
+ * @function
+ * @memberof lang
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {...*} [args] Other operands.
+ * @return {Object} Returns the updated object.
+ * @example or({ nested: { prop: false } }, 'nested.prop', true) // { nested: { prop: true } }
+ * @example or({ nested: { prop: true } }, 'nested.prop', false, false) // { nested: { prop: true } }
+ * @since 1.0.0
+ */
+var or = convert(function (v) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ return args.reduce(function (acc, arg) {
+ return acc || arg;
+ }, v);
+});
+
/**
* Replaces by the subtraction of the former number by the given number.
* @function
@@ -4003,7 +4030,7 @@ var trimRight = convertStringMethod('trimRight');
exports.arrayConcat = concat;
exports.fill = fill;
-exports.filter = filter;
+exports.filter = filter$1;
exports.map = map$4;
exports.pop = pop;
exports.push = push;
@@ -4034,8 +4061,10 @@ exports.set = set;
exports.unset = unset;
exports.update = update;
exports.add = add;
+exports.and = and;
exports.divide = divide;
exports.multiply = multiply;
+exports.or = or;
exports.subtract = subtract;
exports.toggle = toggle;
exports.assign = assign$3;
diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md
index c224a05e..b45d4f67 100644
--- a/docs/GETTING_STARTED.md
+++ b/docs/GETTING_STARTED.md
@@ -47,8 +47,8 @@ const animals = {
weasels: {
lutraLutra: {
commonNames: ['eurasian otter'],
- }
- }
+ },
+ },
}
const newAnimals = {
@@ -58,8 +58,8 @@ const newAnimals = {
lutraLutra: {
...animals.weasels.otter,
name: 'Lutra lutra',
- }
- }
+ },
+ },
}
```
@@ -72,8 +72,8 @@ const animals = {
weasels: {
lutraLutra: {
commonNames: ['eurasian otter'],
- }
- }
+ },
+ },
}
const newAnimals = set(animals, 'weasels.lutraLutra.name', 'Lutrinae')
diff --git a/docs/immutadot-lodash/1.0/array_difference.js.html b/docs/immutadot-lodash/1.0/array_difference.js.html
index 064413d2..7e339911 100644
--- a/docs/immutadot-lodash/1.0/array_difference.js.html
+++ b/docs/immutadot-lodash/1.0/array_difference.js.html
@@ -35,7 +35,7 @@ array/difference.js
- import _difference from 'lodash/difference' import { convert } from 'immutadot/core/convert' const difference = convert(_difference)export { difference }
+ import { difference as _difference } from 'lodash' import { convert } from 'immutadot' const difference = convert(_difference)export { difference }
diff --git a/docs/immutadot-lodash/1.0/array_differenceBy.js.html b/docs/immutadot-lodash/1.0/array_differenceBy.js.html
index 7cf05d5c..93d88d48 100644
--- a/docs/immutadot-lodash/1.0/array_differenceBy.js.html
+++ b/docs/immutadot-lodash/1.0/array_differenceBy.js.html
@@ -35,7 +35,7 @@ array/differenceBy.js
- import _differenceBy from 'lodash/differenceBy' import { convert } from 'immutadot/core/convert' const differenceBy = convert(_differenceBy)export { differenceBy }
+ import { differenceBy as _differenceBy } from 'lodash' import { convert } from 'immutadot' const differenceBy = convert(_differenceBy)export { differenceBy }
diff --git a/docs/immutadot-lodash/1.0/array_differenceWith.js.html b/docs/immutadot-lodash/1.0/array_differenceWith.js.html
index ac704ce9..a394964a 100644
--- a/docs/immutadot-lodash/1.0/array_differenceWith.js.html
+++ b/docs/immutadot-lodash/1.0/array_differenceWith.js.html
@@ -35,7 +35,7 @@ array/differenceWith.js
- import _differenceWith from 'lodash/differenceWith' import { convert } from 'immutadot/core/convert' const differenceWith = convert(_differenceWith)export { differenceWith }
+ import { differenceWith as _differenceWith } from 'lodash' import { convert } from 'immutadot' const differenceWith = convert(_differenceWith)export { differenceWith }
diff --git a/docs/immutadot-lodash/1.0/array_drop.js.html b/docs/immutadot-lodash/1.0/array_drop.js.html
index f33b1ead..e5e3dfa2 100644
--- a/docs/immutadot-lodash/1.0/array_drop.js.html
+++ b/docs/immutadot-lodash/1.0/array_drop.js.html
@@ -35,7 +35,7 @@ array/drop.js
- import _drop from 'lodash/drop' import { convert } from 'immutadot/core/convert' const drop = convert(_drop)export { drop }
+ import { drop as _drop } from 'lodash' import { convert } from 'immutadot' const drop = convert(_drop)export { drop }
diff --git a/docs/immutadot-lodash/1.0/array_dropRight.js.html b/docs/immutadot-lodash/1.0/array_dropRight.js.html
index 25ce0a06..d300365f 100644
--- a/docs/immutadot-lodash/1.0/array_dropRight.js.html
+++ b/docs/immutadot-lodash/1.0/array_dropRight.js.html
@@ -35,7 +35,7 @@ array/dropRight.js
- import _dropRight from 'lodash/dropRight' import { convert } from 'immutadot/core/convert' const dropRight = convert(_dropRight)export { dropRight }
+ import { dropRight as _dropRight } from 'lodash' import { convert } from 'immutadot' const dropRight = convert(_dropRight)export { dropRight }
diff --git a/docs/immutadot-lodash/1.0/array_dropRightWhile.js.html b/docs/immutadot-lodash/1.0/array_dropRightWhile.js.html
index d1ebfc58..53f63a31 100644
--- a/docs/immutadot-lodash/1.0/array_dropRightWhile.js.html
+++ b/docs/immutadot-lodash/1.0/array_dropRightWhile.js.html
@@ -35,7 +35,7 @@ array/dropRightWhile.js
- import _dropRightWhile from 'lodash/dropRightWhile' import { convert } from 'immutadot/core/convert' const dropRightWhile = convert(_dropRightWhile)export { dropRightWhile }
+ import { dropRightWhile as _dropRightWhile } from 'lodash' import { convert } from 'immutadot' const dropRightWhile = convert(_dropRightWhile)export { dropRightWhile }
diff --git a/docs/immutadot-lodash/1.0/array_dropWhile.js.html b/docs/immutadot-lodash/1.0/array_dropWhile.js.html
index 8f17d338..7fca5938 100644
--- a/docs/immutadot-lodash/1.0/array_dropWhile.js.html
+++ b/docs/immutadot-lodash/1.0/array_dropWhile.js.html
@@ -35,7 +35,7 @@ array/dropWhile.js
- import _dropWhile from 'lodash/dropWhile' import { convert } from 'immutadot/core/convert' const dropWhile = convert(_dropWhile)export { dropWhile }
+ import { dropWhile as _dropWhile } from 'lodash' import { convert } from 'immutadot' const dropWhile = convert(_dropWhile)export { dropWhile }
diff --git a/docs/immutadot-lodash/1.0/array_intersection.js.html b/docs/immutadot-lodash/1.0/array_intersection.js.html
index dd39b650..1779c817 100644
--- a/docs/immutadot-lodash/1.0/array_intersection.js.html
+++ b/docs/immutadot-lodash/1.0/array_intersection.js.html
@@ -35,7 +35,7 @@ array/intersection.js
- import _intersection from 'lodash/intersection' import { convert } from 'immutadot/core/convert' const intersection = convert(_intersection)export { intersection }
+ import { intersection as _intersection } from 'lodash' import { convert } from 'immutadot' const intersection = convert(_intersection)export { intersection }
diff --git a/docs/immutadot-lodash/1.0/array_intersectionBy.js.html b/docs/immutadot-lodash/1.0/array_intersectionBy.js.html
index e219b153..b42d6e91 100644
--- a/docs/immutadot-lodash/1.0/array_intersectionBy.js.html
+++ b/docs/immutadot-lodash/1.0/array_intersectionBy.js.html
@@ -35,7 +35,7 @@ array/intersectionBy.js
- import _intersectionBy from 'lodash/intersectionBy' import { convert } from 'immutadot/core/convert' const intersectionBy = convert(_intersectionBy)export { intersectionBy }
+ import { intersectionBy as _intersectionBy } from 'lodash' import { convert } from 'immutadot' const intersectionBy = convert(_intersectionBy)export { intersectionBy }
diff --git a/docs/immutadot-lodash/1.0/array_intersectionWith.js.html b/docs/immutadot-lodash/1.0/array_intersectionWith.js.html
index 04e3aaed..0afa44ff 100644
--- a/docs/immutadot-lodash/1.0/array_intersectionWith.js.html
+++ b/docs/immutadot-lodash/1.0/array_intersectionWith.js.html
@@ -35,7 +35,7 @@ array/intersectionWith.js
- import _intersectionWith from 'lodash/intersectionWith' import { convert } from 'immutadot/core/convert' const intersectionWith = convert(_intersectionWith)export { intersectionWith }
+ import { intersectionWith as _intersectionWith } from 'lodash' import { convert } from 'immutadot' const intersectionWith = convert(_intersectionWith)export { intersectionWith }
diff --git a/docs/immutadot-lodash/1.0/array_pull.js.html b/docs/immutadot-lodash/1.0/array_pull.js.html
index 02e238ff..493552bf 100644
--- a/docs/immutadot-lodash/1.0/array_pull.js.html
+++ b/docs/immutadot-lodash/1.0/array_pull.js.html
@@ -35,7 +35,7 @@ array/pull.js
- import _pull from 'lodash/fp/pull' import { convertLodashFp } from 'util/convertLodashFp' const pull = convertLodashFp(_pull)export { pull }
+ import { pull as _pull } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const pull = convertLodashFp(_pull)export { pull }
diff --git a/docs/immutadot-lodash/1.0/array_pullAll.js.html b/docs/immutadot-lodash/1.0/array_pullAll.js.html
index 97598104..bed6c0e8 100644
--- a/docs/immutadot-lodash/1.0/array_pullAll.js.html
+++ b/docs/immutadot-lodash/1.0/array_pullAll.js.html
@@ -35,7 +35,7 @@ array/pullAll.js
- import _pullAll from 'lodash/fp/pullAll' import { convertLodashFp } from 'util/convertLodashFp' const pullAll = convertLodashFp(_pullAll)export { pullAll }
+ import { pullAll as _pullAll } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const pullAll = convertLodashFp(_pullAll)export { pullAll }
diff --git a/docs/immutadot-lodash/1.0/array_pullAllBy.js.html b/docs/immutadot-lodash/1.0/array_pullAllBy.js.html
index 66e8ab04..85b7f6bd 100644
--- a/docs/immutadot-lodash/1.0/array_pullAllBy.js.html
+++ b/docs/immutadot-lodash/1.0/array_pullAllBy.js.html
@@ -35,7 +35,7 @@ array/pullAllBy.js
- import _pullAllBy from 'lodash/fp/pullAllBy' import { convertLodashFp } from 'util/convertLodashFp' const pullAllBy = convertLodashFp(_pullAllBy)export { pullAllBy }
+ import { pullAllBy as _pullAllBy } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const pullAllBy = convertLodashFp(_pullAllBy)export { pullAllBy }
diff --git a/docs/immutadot-lodash/1.0/array_pullAllWith.js.html b/docs/immutadot-lodash/1.0/array_pullAllWith.js.html
index 9005cd45..77e91a3d 100644
--- a/docs/immutadot-lodash/1.0/array_pullAllWith.js.html
+++ b/docs/immutadot-lodash/1.0/array_pullAllWith.js.html
@@ -35,7 +35,7 @@ array/pullAllWith.js
- import _pullAllWith from 'lodash/fp/pullAllWith' import { convertLodashFp } from 'util/convertLodashFp' const pullAllWith = convertLodashFp(_pullAllWith)export { pullAllWith }
+ import { pullAllWith as _pullAllWith } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const pullAllWith = convertLodashFp(_pullAllWith)export { pullAllWith }
diff --git a/docs/immutadot-lodash/1.0/array_pullAt.js.html b/docs/immutadot-lodash/1.0/array_pullAt.js.html
index 8642b090..9d33ad32 100644
--- a/docs/immutadot-lodash/1.0/array_pullAt.js.html
+++ b/docs/immutadot-lodash/1.0/array_pullAt.js.html
@@ -35,7 +35,7 @@ array/pullAt.js
- import _pullAt from 'lodash/fp/pullAt' import { convertLodashFp } from 'util/convertLodashFp' const pullAt = convertLodashFp(_pullAt)export { pullAt }
+ import { pullAt as _pullAt } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const pullAt = convertLodashFp(_pullAt)export { pullAt }
diff --git a/docs/immutadot-lodash/1.0/array_remove.js.html b/docs/immutadot-lodash/1.0/array_remove.js.html
index 58359034..40bbf0b4 100644
--- a/docs/immutadot-lodash/1.0/array_remove.js.html
+++ b/docs/immutadot-lodash/1.0/array_remove.js.html
@@ -35,7 +35,7 @@ array/remove.js
- import _remove from 'lodash/fp/remove' import { convertLodashFp } from 'util/convertLodashFp' const remove = convertLodashFp(_remove)export { remove }
+ import { remove as _remove } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const remove = convertLodashFp(_remove)export { remove }
diff --git a/docs/immutadot-lodash/1.0/array_take.js.html b/docs/immutadot-lodash/1.0/array_take.js.html
index b57cb440..7c665e77 100644
--- a/docs/immutadot-lodash/1.0/array_take.js.html
+++ b/docs/immutadot-lodash/1.0/array_take.js.html
@@ -35,7 +35,7 @@ array/take.js
- import _take from 'lodash/take' import { convert } from 'immutadot/core/convert' const take = convert(_take)export { take }
+ import { take as _take } from 'lodash' import { convert } from 'immutadot' const take = convert(_take)export { take }
diff --git a/docs/immutadot-lodash/1.0/array_takeRight.js.html b/docs/immutadot-lodash/1.0/array_takeRight.js.html
index d1142ff4..7b8495c2 100644
--- a/docs/immutadot-lodash/1.0/array_takeRight.js.html
+++ b/docs/immutadot-lodash/1.0/array_takeRight.js.html
@@ -35,7 +35,7 @@ array/takeRight.js
- import _takeRight from 'lodash/takeRight' import { convert } from 'immutadot/core/convert' const takeRight = convert(_takeRight)export { takeRight }
+ import { takeRight as _takeRight } from 'lodash' import { convert } from 'immutadot' const takeRight = convert(_takeRight)export { takeRight }
diff --git a/docs/immutadot-lodash/1.0/array_takeRightWhile.js.html b/docs/immutadot-lodash/1.0/array_takeRightWhile.js.html
index b376aed9..872d6dbb 100644
--- a/docs/immutadot-lodash/1.0/array_takeRightWhile.js.html
+++ b/docs/immutadot-lodash/1.0/array_takeRightWhile.js.html
@@ -35,7 +35,7 @@ array/takeRightWhile.js
- import _takeRightWhile from 'lodash/takeRightWhile' import { convert } from 'immutadot/core/convert' const takeRightWhile = convert(_takeRightWhile)export { takeRightWhile }
+ import { takeRightWhile as _takeRightWhile } from 'lodash' import { convert } from 'immutadot' const takeRightWhile = convert(_takeRightWhile)export { takeRightWhile }
diff --git a/docs/immutadot-lodash/1.0/array_takeWhile.js.html b/docs/immutadot-lodash/1.0/array_takeWhile.js.html
index 8f5cb2c2..46d19839 100644
--- a/docs/immutadot-lodash/1.0/array_takeWhile.js.html
+++ b/docs/immutadot-lodash/1.0/array_takeWhile.js.html
@@ -35,7 +35,7 @@ array/takeWhile.js
- import _takeWhile from 'lodash/takeWhile' import { convert } from 'immutadot/core/convert' const takeWhile = convert(_takeWhile)export { takeWhile }
+ import { takeWhile as _takeWhile } from 'lodash' import { convert } from 'immutadot' const takeWhile = convert(_takeWhile)export { takeWhile }
diff --git a/docs/immutadot-lodash/1.0/array_union.js.html b/docs/immutadot-lodash/1.0/array_union.js.html
index 6373002a..9dcd07e4 100644
--- a/docs/immutadot-lodash/1.0/array_union.js.html
+++ b/docs/immutadot-lodash/1.0/array_union.js.html
@@ -35,7 +35,7 @@ array/union.js
- import _union from 'lodash/union' import { convert } from 'immutadot/core/convert' const union = convert(_union)export { union }
+ import { union as _union } from 'lodash' import { convert } from 'immutadot' const union = convert(_union)export { union }
diff --git a/docs/immutadot-lodash/1.0/array_unionBy.js.html b/docs/immutadot-lodash/1.0/array_unionBy.js.html
index bd97403b..e7606540 100644
--- a/docs/immutadot-lodash/1.0/array_unionBy.js.html
+++ b/docs/immutadot-lodash/1.0/array_unionBy.js.html
@@ -35,7 +35,7 @@ array/unionBy.js
- import _unionBy from 'lodash/unionBy' import { convert } from 'immutadot/core/convert' const unionBy = convert(_unionBy)export { unionBy }
+ import { unionBy as _unionBy } from 'lodash' import { convert } from 'immutadot' const unionBy = convert(_unionBy)export { unionBy }
diff --git a/docs/immutadot-lodash/1.0/array_unionWith.js.html b/docs/immutadot-lodash/1.0/array_unionWith.js.html
index 57bdb9c5..78541483 100644
--- a/docs/immutadot-lodash/1.0/array_unionWith.js.html
+++ b/docs/immutadot-lodash/1.0/array_unionWith.js.html
@@ -35,7 +35,7 @@ array/unionWith.js
- import _unionWith from 'lodash/unionWith' import { convert } from 'immutadot/core/convert' const unionWith = convert(_unionWith)export { unionWith }
+ import { unionWith as _unionWith } from 'lodash' import { convert } from 'immutadot' const unionWith = convert(_unionWith)export { unionWith }
diff --git a/docs/immutadot-lodash/1.0/array_xor.js.html b/docs/immutadot-lodash/1.0/array_xor.js.html
index 863f799a..12ec6529 100644
--- a/docs/immutadot-lodash/1.0/array_xor.js.html
+++ b/docs/immutadot-lodash/1.0/array_xor.js.html
@@ -35,7 +35,7 @@ array/xor.js
- import _xor from 'lodash/xor' import { convert } from 'immutadot/core/convert' const xor = convert(_xor)export { xor }
+ import { xor as _xor } from 'lodash' import { convert } from 'immutadot' const xor = convert(_xor)export { xor }
diff --git a/docs/immutadot-lodash/1.0/array_xorBy.js.html b/docs/immutadot-lodash/1.0/array_xorBy.js.html
index cfe218c5..7d0f45bf 100644
--- a/docs/immutadot-lodash/1.0/array_xorBy.js.html
+++ b/docs/immutadot-lodash/1.0/array_xorBy.js.html
@@ -35,7 +35,7 @@ array/xorBy.js
- import _xorBy from 'lodash/xorBy' import { convert } from 'immutadot/core/convert' const xorBy = convert(_xorBy)export { xorBy }
+ import { xorBy as _xorBy } from 'lodash' import { convert } from 'immutadot' const xorBy = convert(_xorBy)export { xorBy }
diff --git a/docs/immutadot-lodash/1.0/array_xorWith.js.html b/docs/immutadot-lodash/1.0/array_xorWith.js.html
index f884a068..c09f47ee 100644
--- a/docs/immutadot-lodash/1.0/array_xorWith.js.html
+++ b/docs/immutadot-lodash/1.0/array_xorWith.js.html
@@ -35,7 +35,7 @@ array/xorWith.js
- import _xorWith from 'lodash/xorWith' import { convert } from 'immutadot/core/convert' const xorWith = convert(_xorWith)export { xorWith }
+ import { xorWith as _xorWith } from 'lodash' import { convert } from 'immutadot' const xorWith = convert(_xorWith)export { xorWith }
diff --git a/docs/immutadot-lodash/1.0/collection_filter.js.html b/docs/immutadot-lodash/1.0/collection_filter.js.html
index a47854ce..2b96deb1 100644
--- a/docs/immutadot-lodash/1.0/collection_filter.js.html
+++ b/docs/immutadot-lodash/1.0/collection_filter.js.html
@@ -35,7 +35,7 @@ collection/filter.js
- import _filter from 'lodash/filter' import { convert } from 'immutadot/core/convert' const filter = convert(_filter)export { filter }
+ import { filter as _filter } from 'lodash' import { convert } from 'immutadot' const filter = convert(_filter)export { filter }
diff --git a/docs/immutadot-lodash/1.0/collection_map.js.html b/docs/immutadot-lodash/1.0/collection_map.js.html
index c4032211..17929164 100644
--- a/docs/immutadot-lodash/1.0/collection_map.js.html
+++ b/docs/immutadot-lodash/1.0/collection_map.js.html
@@ -35,7 +35,7 @@ collection/map.js
- import _map from 'lodash/map' import { convert } from 'immutadot/core/convert' const map = convert(_map)export { map }
+ import { map as _map } from 'lodash' import { convert } from 'immutadot' const map = convert(_map)export { map }
diff --git a/docs/immutadot-lodash/1.0/collection_orderBy.js.html b/docs/immutadot-lodash/1.0/collection_orderBy.js.html
index 05f48168..bbf07395 100644
--- a/docs/immutadot-lodash/1.0/collection_orderBy.js.html
+++ b/docs/immutadot-lodash/1.0/collection_orderBy.js.html
@@ -35,7 +35,7 @@ collection/orderBy.js
- import _orderBy from 'lodash/orderBy' import { convert } from 'immutadot/core/convert' const orderBy = convert(_orderBy)export { orderBy }
+ import { orderBy as _orderBy } from 'lodash' import { convert } from 'immutadot' const orderBy = convert(_orderBy)export { orderBy }
diff --git a/docs/immutadot-lodash/1.0/collection_reject.js.html b/docs/immutadot-lodash/1.0/collection_reject.js.html
index 673e09fa..4eef7dae 100644
--- a/docs/immutadot-lodash/1.0/collection_reject.js.html
+++ b/docs/immutadot-lodash/1.0/collection_reject.js.html
@@ -35,7 +35,7 @@ collection/reject.js
- import _reject from 'lodash/reject' import { convert } from 'immutadot/core/convert' const reject = convert(_reject)export { reject }
+ import { reject as _reject } from 'lodash' import { convert } from 'immutadot' const reject = convert(_reject)export { reject }
diff --git a/docs/immutadot-lodash/1.0/collection_shuffle.js.html b/docs/immutadot-lodash/1.0/collection_shuffle.js.html
index 934f9d4f..eb1bf7f1 100644
--- a/docs/immutadot-lodash/1.0/collection_shuffle.js.html
+++ b/docs/immutadot-lodash/1.0/collection_shuffle.js.html
@@ -35,7 +35,7 @@ collection/shuffle.js
- import _shuffle from 'lodash/shuffle' import { convert } from 'immutadot/core/convert' const shuffle = convert(_shuffle)export { shuffle }
+ import { shuffle as _shuffle } from 'lodash' import { convert } from 'immutadot' const shuffle = convert(_shuffle)export { shuffle }
diff --git a/docs/immutadot-lodash/1.0/collection_sortBy.js.html b/docs/immutadot-lodash/1.0/collection_sortBy.js.html
index 8fb3ec76..958aa3fe 100644
--- a/docs/immutadot-lodash/1.0/collection_sortBy.js.html
+++ b/docs/immutadot-lodash/1.0/collection_sortBy.js.html
@@ -35,7 +35,7 @@ collection/sortBy.js
- import _sortBy from 'lodash/sortBy' import { convert } from 'immutadot/core/convert' const sortBy = convert(_sortBy)export { sortBy }
+ import { sortBy as _sortBy } from 'lodash' import { convert } from 'immutadot' const sortBy = convert(_sortBy)export { sortBy }
diff --git a/docs/immutadot-lodash/1.0/index.html b/docs/immutadot-lodash/1.0/index.html
index aae6a87c..a61b624d 100644
--- a/docs/immutadot-lodash/1.0/index.html
+++ b/docs/immutadot-lodash/1.0/index.html
@@ -56,87 +56,69 @@ Namespaces
-We are still writing the documentation, you can already find out about the updated API and our new package immutadot-lodash .
-If you would like to try out 1.0 before its official release, install it with :
-yarn add immutadot@next
or
-npm install immutadot@next
Immutability In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
-An immutable object is an object that cannot be changed once created. It brings several benefits1 :
-
-Data changes detection made simple (Shallow comparison)
-Memoization
-Improve rendering performances
-Explicit data changes
-Avoid side effects
-
-Our approach Concise ES2015+ new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
-Interoperability immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
-Exhaustive and yet extensible immutadâ—Źt comes with a large set of built-in utilities, mostly based on ES2015+ . You can also find a package called immutadot-lodash with some of lodash 's utilities. You haven't found what you're looking for? Do it yourself with the convert
feature.
-Learning curve If you are already familiar with ES2015+ and lodash then you should be able to use immutadâ—Źt quickly.
+1.0 is out 🎉If you were using a previous version of immutad●t, check out the migrating guide .
Installation immutadâ—Źt is available on npm repository .
using yarn:
$ yarn add immutadot
using npm:
$ npm install immutadot
or you can directly download sources .
Usage ES modules:
import { set } from 'immutadot'
CommonJS:
-const { set } = require('immutadot')
Example Object used in the following example:
-const animals = {
- weasels: [
- {
- vernacularName: 'badger',
- scientificName: 'Meles meles'
+const { set } = require('immutadot')
Example Quickly set nested properties using set()
+import { set } from 'immutadot'
+
+const animals = {
+ weasels: {
+ lutraLutra: {
+ commonNames: ['eurasian otter'],
},
- {
- vernacularName: 'otter',
- }
- ]
-}
Let's add the otter's scientific name without mutating the original object structure.
-using ES2015+:
-const newAnimals = {
- ...animals,
- weasels: [...animals.weasel]
+ },
}
-newAnimals.weasels[1] = {
- ...newAnimals.weasels[1],
- scientificName: 'Lutrinae'
-}
using immutadâ—Źt:
-const newAnimals = set(animals, 'weasels[1].scientificName', 'Lutrinae')
Feel free to try immutadâ—Źt on runkit .
-Path notation immutadâ—Źt brings a few improvements to the classic dot notation:
-Slice notation The slice notation lets you iterate over arrays to apply operations without having to map arrays at each level of imbrication.
-We forgot to capitalize vernacular names in the input .
-using ES2015+:
-import { capitalize } from 'lodash'
-const newAnimals = {
- ...animals,
- weasels: animals.weasels.map(weasel => {
- return {
- ...weasel,
- vernacularName: capitalize(weasel.vernacularName),
- }
- }),
-}
using immutadâ—Źt-lodash:
-import { capitalize } from 'immutadot-lodash'
-const newAnimals = capitalize(animals, 'weasels[:].vernacularName')
List notation The list notation lets you iterate over the keys of objects used as collection or map to apply operations.
-toggle({ nested: { prop: { 1: { active: true }, 2: { active: false } } } }, 'nested.prop.{*}.active')
-// { nested: { prop: { 1: { active: false }, 2: { active: true }] } }
-
-toLowerCase({ nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'Hi' }, 3: { msg: 'Good morning' } } } }, 'nested.prop{2, 3}.msg')
-// { nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'hi' }, 3: { msg: 'good morning' } } } }
Performances We reused a simple benchmark originally made by mweststrate for immer .
-It updates 10.000 items out of list of 100.000 todos items, these tests were ran with Node 8.4.0 on an Intel® Core™ i7-6560U CPU @ 2.20GHz:
-Update todos list
- âś“ with mutation (2ms)
- âś“ with deep cloning, then mutation (689ms)
- âś“ with ES2015 destructuring (42ms)
- âś“ with immutable (w/o conversion to plain JS objects) (50ms)
- âś“ with immutable (w/ conversion to plain JS objects) (1011ms)
- âś“ with immer (proxy implementation w/o autofreeze) (259ms)
- âś“ with immutadâ—Źt (77ms)
When applying operations on a path immutadâ—Źt tries to create the minimum of objects or arrays needed to guarantee your data structure to be immutable.
-Documentation Latest API documentation for our different packages are available here:
+const newAnimals = set(animals, 'weasels.lutraLutra.name', 'Lutrinae')
Learn more about what immutadâ—Źt can do in the Getting started .
+Feel free to try immutadâ—Źt on runkit .
+Documentation Getting started A fast overview of immutadâ—Źt's features is available in the Getting started guide.
+API The detailed API documentations of the different packages are available here:
Looking for older versions API documentation? Links are available here .
+Migrating from 0.x versions If you were using a version of immutadâ—Źt previous to 1.0, check out the migrating guide .
+Performances A simple benchmark (freely inspired from one made by mweststrate for immer ) reveals that immutadâ—Źt shows good results compared to other libraries.
+:warning: The following results should be taken with caution, they may vary depending on the hardware, the JavaScript engine, and the kind of operations performed. This particular test updates 10% out of a list of todos items, and was ran with Node 9.3.0 on an Intel® Core™ i7-6560U CPU @ 2.20GHz.
+Update small todos list (1000 items):
+ ES2015 destructuring: ~16961ops/s (0.06ms/op) on 50000ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~6538ops/s (0.15ms/op) on 50000ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~106ops/s (9.43ms/op) on 3195ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~2191ops/s (0.46ms/op) on 50000ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~494ops/s (2.02ms/op) on 14827ops
+ immutadâ—Źt 1.0.0: ~2431ops/s (0.41ms/op) on 50000ops
+Update medium todos list (10000 items):
+ ES2015 destructuring: ~1781ops/s (0.56ms/op) on 5000ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~587ops/s (1.70ms/op) on 5000ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~10ops/s (100.80ms/op) on 299ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~185ops/s (5.42ms/op) on 5000ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~47ops/s (21.21ms/op) on 1415ops
+ immutadâ—Źt 1.0.0: ~245ops/s (4.08ms/op) on 5000ops
+Update large todos list (100000 items):
+ ES2015 destructuring: ~116ops/s (8.61ms/op) on 500ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~56ops/s (17.95ms/op) on 500ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~1ops/s (1052.45ms/op) on 29ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~21ops/s (47.81ms/op) on 500ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~4ops/s (275.59ms/op) on 110ops
+ immutadâ—Źt 1.0.0: ~23ops/s (44.15ms/op) on 500ops
Immutability In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
+An immutable object is an object that cannot be changed once created. It brings several benefits1 :
+
+Data changes detection made simple (Shallow comparison)
+Memoization
+Improve rendering performances
+Explicit data changes
+Avoid side effects
+
+Our approach Concise ES2015+ new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
+Interoperability immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
+Exhaustive and yet extensible immutadâ—Źt comes with a large set of built-in utilities, mostly based on ES2015+ . You can also find a package called immutadot-lodash with some of lodash 's utilities. You haven't found what you're looking for? Do it yourself with the convert
feature.
+Learning curve If you are already familiar with ES2015+ and lodash then you should be able to use immutadâ—Źt quickly.
Contributing We want contributing to immutadâ—Źt to be fun, enjoyable, and educational for anyone, and everyone.
In the interest of fostering an open and welcoming environment, we have adopted a Code of Conduct that we expect project participants to commit to. Please read the full text so that you can understand what behavior will and will not be tolerated.
If you are interested in contributing to immutadâ—Źt, please read our contributing guide to learn more about how to suggest bugfixes and improvements.
diff --git a/docs/immutadot-lodash/1.0/object_defaults.js.html b/docs/immutadot-lodash/1.0/object_defaults.js.html
index 91358843..cfdfb5bf 100644
--- a/docs/immutadot-lodash/1.0/object_defaults.js.html
+++ b/docs/immutadot-lodash/1.0/object_defaults.js.html
@@ -35,7 +35,7 @@ object/defaults.js
- import _defaults from 'lodash/fp/defaults' import { convertLodashFp } from 'util/convertLodashFp' const defaults = convertLodashFp(_defaults)export { defaults }
+ import { defaults as _defaults } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const defaults = convertLodashFp(_defaults)export { defaults }
diff --git a/docs/immutadot-lodash/1.0/object_mapKeys.js.html b/docs/immutadot-lodash/1.0/object_mapKeys.js.html
index e0cd0b22..7cda6563 100644
--- a/docs/immutadot-lodash/1.0/object_mapKeys.js.html
+++ b/docs/immutadot-lodash/1.0/object_mapKeys.js.html
@@ -35,7 +35,7 @@ object/mapKeys.js
- import _mapKeys from 'lodash/mapKeys' import { convert } from 'immutadot/core/convert' const mapKeys = convert(_mapKeys)export { mapKeys }
+ import { mapKeys as _mapKeys } from 'lodash' import { convert } from 'immutadot' const mapKeys = convert(_mapKeys)export { mapKeys }
diff --git a/docs/immutadot-lodash/1.0/object_mapValues.js.html b/docs/immutadot-lodash/1.0/object_mapValues.js.html
index b8148f9e..9cf79707 100644
--- a/docs/immutadot-lodash/1.0/object_mapValues.js.html
+++ b/docs/immutadot-lodash/1.0/object_mapValues.js.html
@@ -35,7 +35,7 @@ object/mapValues.js
- import _mapValues from 'lodash/mapValues' import { convert } from 'immutadot/core/convert' const mapValues = convert(_mapValues)export { mapValues }
+ import { mapValues as _mapValues } from 'lodash' import { convert } from 'immutadot' const mapValues = convert(_mapValues)export { mapValues }
diff --git a/docs/immutadot-lodash/1.0/object_merge.js.html b/docs/immutadot-lodash/1.0/object_merge.js.html
index 9d0b1e0c..289ae683 100644
--- a/docs/immutadot-lodash/1.0/object_merge.js.html
+++ b/docs/immutadot-lodash/1.0/object_merge.js.html
@@ -35,7 +35,7 @@ object/merge.js
- import _merge from 'lodash/fp/merge' import { convertLodashFp } from 'util/convertLodashFp' const merge = convertLodashFp(_merge)export { merge }
+ import { merge as _merge } from 'lodash/fp' import { convertLodashFp } from 'util/convertLodashFp' const merge = convertLodashFp(_merge)export { merge }
diff --git a/docs/immutadot-lodash/1.0/object_omit.js.html b/docs/immutadot-lodash/1.0/object_omit.js.html
index 0e1897d6..a80a3a98 100644
--- a/docs/immutadot-lodash/1.0/object_omit.js.html
+++ b/docs/immutadot-lodash/1.0/object_omit.js.html
@@ -35,7 +35,7 @@ object/omit.js
- import _omit from 'lodash/omit' import { convert } from 'immutadot/core/convert' const omit = convert(_omit)export { omit }
+ import { omit as _omit } from 'lodash' import { convert } from 'immutadot' const omit = convert(_omit)export { omit }
diff --git a/docs/immutadot-lodash/1.0/object_omitBy.js.html b/docs/immutadot-lodash/1.0/object_omitBy.js.html
index 960065bf..d0ddcc6e 100644
--- a/docs/immutadot-lodash/1.0/object_omitBy.js.html
+++ b/docs/immutadot-lodash/1.0/object_omitBy.js.html
@@ -35,7 +35,7 @@ object/omitBy.js
- import _omitBy from 'lodash/omitBy' import { convert } from 'immutadot/core/convert' const omitBy = convert(_omitBy)export { omitBy }
+ import { omitBy as _omitBy } from 'lodash' import { convert } from 'immutadot' const omitBy = convert(_omitBy)export { omitBy }
diff --git a/docs/immutadot-lodash/1.0/object_pick.js.html b/docs/immutadot-lodash/1.0/object_pick.js.html
index 224f659e..f73fcc37 100644
--- a/docs/immutadot-lodash/1.0/object_pick.js.html
+++ b/docs/immutadot-lodash/1.0/object_pick.js.html
@@ -35,7 +35,7 @@ object/pick.js
- import _pick from 'lodash/pick' import { convert } from 'immutadot/core/convert' const pick = convert(_pick)export { pick }
+ import { pick as _pick } from 'lodash' import { convert } from 'immutadot' const pick = convert(_pick)export { pick }
diff --git a/docs/immutadot-lodash/1.0/object_pickBy.js.html b/docs/immutadot-lodash/1.0/object_pickBy.js.html
index f185f096..49b809b5 100644
--- a/docs/immutadot-lodash/1.0/object_pickBy.js.html
+++ b/docs/immutadot-lodash/1.0/object_pickBy.js.html
@@ -35,7 +35,7 @@ object/pickBy.js
- import _pickBy from 'lodash/pickBy' import { convert } from 'immutadot/core/convert' const pickBy = convert(_pickBy)export { pickBy }
+ import { pickBy as _pickBy } from 'lodash' import { convert } from 'immutadot' const pickBy = convert(_pickBy)export { pickBy }
diff --git a/docs/immutadot-lodash/1.0/string_capitalize.js.html b/docs/immutadot-lodash/1.0/string_capitalize.js.html
index 09577ae8..b7a96d04 100644
--- a/docs/immutadot-lodash/1.0/string_capitalize.js.html
+++ b/docs/immutadot-lodash/1.0/string_capitalize.js.html
@@ -35,7 +35,7 @@ string/capitalize.js
- import _capitalize from 'lodash/capitalize' import { convert } from 'immutadot/core/convert' const capitalize = convert(_capitalize)export { capitalize }
+ import { capitalize as _capitalize } from 'lodash' import { convert } from 'immutadot' const capitalize = convert(_capitalize)export { capitalize }
diff --git a/docs/immutadot-lodash/1.0/string_toLower.js.html b/docs/immutadot-lodash/1.0/string_toLower.js.html
index 9f3cc516..25e18825 100644
--- a/docs/immutadot-lodash/1.0/string_toLower.js.html
+++ b/docs/immutadot-lodash/1.0/string_toLower.js.html
@@ -35,7 +35,7 @@ string/toLower.js
- import _toLower from 'lodash/toLower' import { convert } from 'immutadot/core/convert' const toLower = convert(_toLower)export { toLower }
+ import { toLower as _toLower } from 'lodash' import { convert } from 'immutadot' const toLower = convert(_toLower)export { toLower }
diff --git a/docs/immutadot-lodash/1.0/string_toUpper.js.html b/docs/immutadot-lodash/1.0/string_toUpper.js.html
index ff1e2339..6c677c76 100644
--- a/docs/immutadot-lodash/1.0/string_toUpper.js.html
+++ b/docs/immutadot-lodash/1.0/string_toUpper.js.html
@@ -35,7 +35,7 @@ string/toUpper.js
- import _toUpper from 'lodash/toUpper' import { convert } from 'immutadot/core/convert' const toUpper = convert(_toUpper)export { toUpper }
+ import { toUpper as _toUpper } from 'lodash' import { convert } from 'immutadot' const toUpper = convert(_toUpper)export { toUpper }
diff --git a/docs/immutadot-lodash/1.0/util_convertLodashFp.js.html b/docs/immutadot-lodash/1.0/util_convertLodashFp.js.html
index dab39e5e..0d619be8 100644
--- a/docs/immutadot-lodash/1.0/util_convertLodashFp.js.html
+++ b/docs/immutadot-lodash/1.0/util_convertLodashFp.js.html
@@ -35,7 +35,7 @@ util/convertLodashFp.js
- import { convert } from 'immutadot/core/convert' import { lodashFpConvert } from './lodashFpConvert' const convertLodashFp = fn => convert(lodashFpConvert(fn))export { convertLodashFp, }
+ import { convert } from 'immutadot' import { lodashFpConvert } from './lodashFpConvert' const convertLodashFp = fn => convert(lodashFpConvert(fn))export { convertLodashFp, }
diff --git a/docs/immutadot/1.0/array.html b/docs/immutadot/1.0/array.html
index 5f3c9943..3e8502dc 100644
--- a/docs/immutadot/1.0/array.html
+++ b/docs/immutadot/1.0/array.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_concat.js.html b/docs/immutadot/1.0/array_concat.js.html
index b82cc680..f74917e9 100644
--- a/docs/immutadot/1.0/array_concat.js.html
+++ b/docs/immutadot/1.0/array_concat.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_fill.js.html b/docs/immutadot/1.0/array_fill.js.html
index 81037453..2f2a6058 100644
--- a/docs/immutadot/1.0/array_fill.js.html
+++ b/docs/immutadot/1.0/array_fill.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_filter.js.html b/docs/immutadot/1.0/array_filter.js.html
index f4ca4535..44a10fc9 100644
--- a/docs/immutadot/1.0/array_filter.js.html
+++ b/docs/immutadot/1.0/array_filter.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_index.js.html b/docs/immutadot/1.0/array_index.js.html
index 78f08e04..4c11a54a 100644
--- a/docs/immutadot/1.0/array_index.js.html
+++ b/docs/immutadot/1.0/array_index.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_map.js.html b/docs/immutadot/1.0/array_map.js.html
index bb957abf..b36a458b 100644
--- a/docs/immutadot/1.0/array_map.js.html
+++ b/docs/immutadot/1.0/array_map.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_pop.js.html b/docs/immutadot/1.0/array_pop.js.html
index 4dd445ac..7fbaa27f 100644
--- a/docs/immutadot/1.0/array_pop.js.html
+++ b/docs/immutadot/1.0/array_pop.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_push.js.html b/docs/immutadot/1.0/array_push.js.html
index 799bd962..eb97e991 100644
--- a/docs/immutadot/1.0/array_push.js.html
+++ b/docs/immutadot/1.0/array_push.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_reverse.js.html b/docs/immutadot/1.0/array_reverse.js.html
index 245fa07e..815d97fb 100644
--- a/docs/immutadot/1.0/array_reverse.js.html
+++ b/docs/immutadot/1.0/array_reverse.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_shift.js.html b/docs/immutadot/1.0/array_shift.js.html
index 44262b76..7aa70f77 100644
--- a/docs/immutadot/1.0/array_shift.js.html
+++ b/docs/immutadot/1.0/array_shift.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_slice.js.html b/docs/immutadot/1.0/array_slice.js.html
index 5dfd5c01..459f4615 100644
--- a/docs/immutadot/1.0/array_slice.js.html
+++ b/docs/immutadot/1.0/array_slice.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_sort.js.html b/docs/immutadot/1.0/array_sort.js.html
index af78fb65..976d82bb 100644
--- a/docs/immutadot/1.0/array_sort.js.html
+++ b/docs/immutadot/1.0/array_sort.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_splice.js.html b/docs/immutadot/1.0/array_splice.js.html
index 890ca589..92c74d35 100644
--- a/docs/immutadot/1.0/array_splice.js.html
+++ b/docs/immutadot/1.0/array_splice.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/array_unshift.js.html b/docs/immutadot/1.0/array_unshift.js.html
index f71357ad..bbf5b8ff 100644
--- a/docs/immutadot/1.0/array_unshift.js.html
+++ b/docs/immutadot/1.0/array_unshift.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/core.html b/docs/immutadot/1.0/core.html
index 2a5ed90f..d3957a87 100644
--- a/docs/immutadot/1.0/core.html
+++ b/docs/immutadot/1.0/core.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
@@ -307,6 +307,188 @@
Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates a function that will successively call all functions contained in args
.
+Each function is called with the result of the previous one.
+Non functions args
are tolerated and will be ignored.
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+
+
+ args
+
+
+
+
+
+
+function
+|
+
+Array.<function()>
+
+
+
+
+
+
+
+
+
+
+
+
+ repeatable
+
+
+
+
+
+
+ The functions to apply
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ A function successively calling function args
+
+
+
+
+
+
+ Type
+
+
+
+flow.flowFunction
+
+
+
+
+
+
+
+
+
+
+
(static) get(obj, path, defaultValue) → {*}
diff --git a/docs/immutadot/1.0/core_convert.js.html b/docs/immutadot/1.0/core_convert.js.html
index ab08becb..a88a1a30 100644
--- a/docs/immutadot/1.0/core_convert.js.html
+++ b/docs/immutadot/1.0/core_convert.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/core_flow.js.html b/docs/immutadot/1.0/core_flow.js.html
new file mode 100644
index 00000000..38cbe25f
--- /dev/null
+++ b/docs/immutadot/1.0/core_flow.js.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
core/flow.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Namespaces
+
+
+
+
+
core/flow.js
+
+
+
+
+
+
+
+
+
+ import { flatten } from 'util/array' import { isFunction } from 'util/lang' function flow (...args ) { const fns = flatten(args) .filter(fn => isFunction(fn)) .map(fn => fn.applier === undefined ? ( ([obj, appliedPaths] ) => [fn(obj), appliedPaths] ) : ( ([obj, appliedPaths] ) => [ fn.applier(obj, appliedPaths), [...appliedPaths, fn.applier.path], ] )) return obj => { const [result] = fns.reduce( (acc, fn ) => fn(acc), [obj, []], ) return result } } export { flow }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/immutadot/1.0/core_get.js.html b/docs/immutadot/1.0/core_get.js.html
index 78aaaa9e..61fd0d8f 100644
--- a/docs/immutadot/1.0/core_get.js.html
+++ b/docs/immutadot/1.0/core_get.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
@@ -35,7 +35,7 @@
core/get.js
- import { index, prop, } from 'path/consts' import { isNil } from 'util/lang' import { unsafeToPath } from 'path/toPath' function get (obj, path, defaultValue ) { function walkPath (curObj, remPath ) { if (remPath.length === 0 ) return curObj === undefined ? defaultValue : curObj if (isNil(curObj)) return defaultValue const [[, prop], ...pathRest] = remPath return walkPath(curObj[prop], pathRest) } const parsedPath = unsafeToPath(path) if (parsedPath.some(([propType] ) => propType !== prop && propType !== index)) throw TypeError ('get supports only properties and array indexes in path' ) return walkPath(obj, parsedPath) } export { get }
+ import { index, prop, } from 'path/consts' import { isNil } from 'util/lang' import { toPath } from 'path/toPath' function get (obj, path, defaultValue ) { function walkPath (curObj, remPath ) { if (remPath.length === 0 ) return curObj === undefined ? defaultValue : curObj if (isNil(curObj)) return defaultValue const [[, prop], ...pathRest] = remPath return walkPath(curObj[prop], pathRest) } const parsedPath = toPath(path) if (parsedPath.some(([propType] ) => propType !== prop && propType !== index)) throw TypeError ('get supports only properties and array indexes in path' ) return walkPath(obj, parsedPath) } export { get }
diff --git a/docs/immutadot/1.0/core_index.js.html b/docs/immutadot/1.0/core_index.js.html
index be1d700d..01547efc 100644
--- a/docs/immutadot/1.0/core_index.js.html
+++ b/docs/immutadot/1.0/core_index.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
@@ -35,7 +35,7 @@
core/index.js
- export { convert } from './convert' export { get } from './get' export { set } from './set' export { unset } from './unset' export { update } from './update'
+ export { convert } from './convert' export { flow } from './flow' export { get } from './get' export { set } from './set' export { unset } from './unset' export { update } from './update'
diff --git a/docs/immutadot/1.0/core_set.js.html b/docs/immutadot/1.0/core_set.js.html
index 7c2c5aff..2c1fff61 100644
--- a/docs/immutadot/1.0/core_set.js.html
+++ b/docs/immutadot/1.0/core_set.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/core_unset.js.html b/docs/immutadot/1.0/core_unset.js.html
index 5dbc6498..d25efffe 100644
--- a/docs/immutadot/1.0/core_unset.js.html
+++ b/docs/immutadot/1.0/core_unset.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/core_update.js.html b/docs/immutadot/1.0/core_update.js.html
index 3ecfea08..59826801 100644
--- a/docs/immutadot/1.0/core_update.js.html
+++ b/docs/immutadot/1.0/core_update.js.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
diff --git a/docs/immutadot/1.0/flow.html b/docs/immutadot/1.0/flow.html
deleted file mode 100644
index cd386b1d..00000000
--- a/docs/immutadot/1.0/flow.html
+++ /dev/null
@@ -1,497 +0,0 @@
-
-
-
-
-
-
flow - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Namespaces
-
-
-
-
-
flow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
- Since:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Flow functions.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
- Since:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Successively calls fns
.
-Each function is called with the result of the previous one.
-Falsey functions (null
, undefined
and false
) are tolerated and will be skipped.
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
-
-
- args
-
-
-
-
-
-
-function
-|
-
-Array.<function()>
-
-
-
-
-
-
-
-
-
-
-
-
- repeatable
-
-
-
-
-
-
- The functions to apply
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- A function successively calling fns
-
-
-
-
-
-
- Type
-
-
-
-flow.flowFunction
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Type Definitions
-
-
-
-
-
-
- flowFunction(arg) → {*}
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
- Since:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A function successively applying a list of functions.
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
-
-
- arg
-
-
-
-
-
-
-*
-
-
-
-
-
-
-
-
-
- The starting value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- The resulting value
-
-
-
-
-
-
- Type
-
-
-
-*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/immutadot/1.0/flow_flow.js.html b/docs/immutadot/1.0/flow_flow.js.html
deleted file mode 100644
index 03fdb6af..00000000
--- a/docs/immutadot/1.0/flow_flow.js.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
flow/flow.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Namespaces
-
-
-
-
-
flow/flow.js
-
-
-
-
-
-
-
-
-
- import { flatten } from 'util/array' import { isNil } from 'util/lang' function flow (...args ) { const fns = flatten(args) .filter(fn => !isNil(fn) && fn !== false ) .map(fn => fn.applier === undefined ? ( ([obj, appliedPaths] ) => [fn(obj), appliedPaths] ) : ( ([obj, appliedPaths] ) => [ fn.applier(obj, appliedPaths), [...appliedPaths, fn.applier.path], ] )) return obj => { const [result] = fns.reduce( (acc, fn ) => fn(acc), [obj, []], ) return result } } export { flow }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/immutadot/1.0/flow_index.js.html b/docs/immutadot/1.0/flow_index.js.html
deleted file mode 100644
index 598bbfc0..00000000
--- a/docs/immutadot/1.0/flow_index.js.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
flow/index.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Namespaces
-
-
-
-
-
flow/index.js
-
-
-
-
-
-
-
-
-
- export { flow } from './flow'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/immutadot/1.0/index.html b/docs/immutadot/1.0/index.html
index 3a8fbcff..6f31eda1 100644
--- a/docs/immutadot/1.0/index.html
+++ b/docs/immutadot/1.0/index.html
@@ -20,7 +20,7 @@
- Namespaces
+ Namespaces
@@ -56,87 +56,69 @@
We are still writing the documentation, you can already find out about the updated API and our new package immutadot-lodash .
-
If you would like to try out 1.0 before its official release, install it with :
-
yarn add immutadot@next
or
-
npm install immutadot@next
Immutability In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
-
An immutable object is an object that cannot be changed once created. It brings several benefits1 :
-
-Data changes detection made simple (Shallow comparison)
-Memoization
-Improve rendering performances
-Explicit data changes
-Avoid side effects
-
-
Our approach Concise ES2015+ new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
-
Interoperability immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
-
Exhaustive and yet extensible immutadâ—Źt comes with a large set of built-in utilities, mostly based on ES2015+ . You can also find a package called immutadot-lodash with some of lodash 's utilities. You haven't found what you're looking for? Do it yourself with the convert
feature.
-
Learning curve If you are already familiar with ES2015+ and lodash then you should be able to use immutadâ—Źt quickly.
+
1.0 is out 🎉If you were using a previous version of immutad●t, check out the migrating guide .
Installation immutadâ—Źt is available on npm repository .
using yarn:
$ yarn add immutadot
using npm:
$ npm install immutadot
or you can directly download sources .
Usage ES modules:
import { set } from 'immutadot'
CommonJS:
-
const { set } = require('immutadot')
Example Object used in the following example:
-
const animals = {
- weasels: [
- {
- vernacularName: 'badger',
- scientificName: 'Meles meles'
+const { set } = require('immutadot')
Example Quickly set nested properties using set()
+import { set } from 'immutadot'
+
+const animals = {
+ weasels: {
+ lutraLutra: {
+ commonNames: ['eurasian otter'],
},
- {
- vernacularName: 'otter',
- }
- ]
-}
Let's add the otter's scientific name without mutating the original object structure.
-using ES2015+:
-const newAnimals = {
- ...animals,
- weasels: [...animals.weasel]
+ },
}
-newAnimals.weasels[1] = {
- ...newAnimals.weasels[1],
- scientificName: 'Lutrinae'
-}
using immutadâ—Źt:
-const newAnimals = set(animals, 'weasels[1].scientificName', 'Lutrinae')
Feel free to try immutadâ—Źt on runkit .
-Path notation immutadâ—Źt brings a few improvements to the classic dot notation:
-Slice notation The slice notation lets you iterate over arrays to apply operations without having to map arrays at each level of imbrication.
-We forgot to capitalize vernacular names in the input .
-using ES2015+:
-import { capitalize } from 'lodash'
-const newAnimals = {
- ...animals,
- weasels: animals.weasels.map(weasel => {
- return {
- ...weasel,
- vernacularName: capitalize(weasel.vernacularName),
- }
- }),
-}
using immutadâ—Źt-lodash:
-import { capitalize } from 'immutadot-lodash'
-const newAnimals = capitalize(animals, 'weasels[:].vernacularName')
List notation The list notation lets you iterate over the keys of objects used as collection or map to apply operations.
-toggle({ nested: { prop: { 1: { active: true }, 2: { active: false } } } }, 'nested.prop.{*}.active')
-// { nested: { prop: { 1: { active: false }, 2: { active: true }] } }
-
-toLowerCase({ nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'Hi' }, 3: { msg: 'Good morning' } } } }, 'nested.prop{2, 3}.msg')
-// { nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'hi' }, 3: { msg: 'good morning' } } } }
Performances We reused a simple benchmark originally made by mweststrate for immer .
-It updates 10.000 items out of list of 100.000 todos items, these tests were ran with Node 8.4.0 on an Intel® Core™ i7-6560U CPU @ 2.20GHz:
-Update todos list
- âś“ with mutation (2ms)
- âś“ with deep cloning, then mutation (689ms)
- âś“ with ES2015 destructuring (42ms)
- âś“ with immutable (w/o conversion to plain JS objects) (50ms)
- âś“ with immutable (w/ conversion to plain JS objects) (1011ms)
- âś“ with immer (proxy implementation w/o autofreeze) (259ms)
- âś“ with immutadâ—Źt (77ms)
When applying operations on a path immutadâ—Źt tries to create the minimum of objects or arrays needed to guarantee your data structure to be immutable.
-Documentation Latest API documentation for our different packages are available here:
+const newAnimals = set(animals, 'weasels.lutraLutra.name', 'Lutrinae')
Learn more about what immutadâ—Źt can do in the Getting started .
+
Feel free to try immutadâ—Źt on runkit .
+
Documentation Getting started A fast overview of immutadâ—Źt's features is available in the Getting started guide.
+
API The detailed API documentations of the different packages are available here:
Looking for older versions API documentation? Links are available here .
+
Migrating from 0.x versions If you were using a version of immutadâ—Źt previous to 1.0, check out the migrating guide .
+
Performances A simple benchmark (freely inspired from one made by mweststrate for immer ) reveals that immutadâ—Źt shows good results compared to other libraries.
+
:warning: The following results should be taken with caution, they may vary depending on the hardware, the JavaScript engine, and the kind of operations performed. This particular test updates 10% out of a list of todos items, and was ran with Node 9.3.0 on an Intel® Core™ i7-6560U CPU @ 2.20GHz.
+
Update small todos list (1000 items):
+ ES2015 destructuring: ~16961ops/s (0.06ms/op) on 50000ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~6538ops/s (0.15ms/op) on 50000ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~106ops/s (9.43ms/op) on 3195ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~2191ops/s (0.46ms/op) on 50000ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~494ops/s (2.02ms/op) on 14827ops
+ immutadâ—Źt 1.0.0: ~2431ops/s (0.41ms/op) on 50000ops
+Update medium todos list (10000 items):
+ ES2015 destructuring: ~1781ops/s (0.56ms/op) on 5000ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~587ops/s (1.70ms/op) on 5000ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~10ops/s (100.80ms/op) on 299ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~185ops/s (5.42ms/op) on 5000ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~47ops/s (21.21ms/op) on 1415ops
+ immutadâ—Źt 1.0.0: ~245ops/s (4.08ms/op) on 5000ops
+Update large todos list (100000 items):
+ ES2015 destructuring: ~116ops/s (8.61ms/op) on 500ops
+ immutable 3.8.2 (w/o conversion to plain JS objects): ~56ops/s (17.95ms/op) on 500ops
+ immutable 3.8.2 (w/ conversion to plain JS objects): ~1ops/s (1052.45ms/op) on 29ops
+ immer 0.8.1 (proxy implementation w/o autofreeze): ~21ops/s (47.81ms/op) on 500ops
+ immer 0.8.1 (ES5 implementation w/o autofreeze): ~4ops/s (275.59ms/op) on 110ops
+ immutadâ—Źt 1.0.0: ~23ops/s (44.15ms/op) on 500ops
Immutability In the last few years one of our biggest challenge has been to find an efficient way to detect changes in our data to determine when to re-render our interfaces.
+
An immutable object is an object that cannot be changed once created. It brings several benefits1 :
+
+Data changes detection made simple (Shallow comparison)
+Memoization
+Improve rendering performances
+Explicit data changes
+Avoid side effects
+
+
Our approach Concise ES2015+ new features are great to deal with arrays and objects. As data structures expand, the code you write to make data immutable gets bigger and less readable. immutadâ—Źt uses the dot notation to address this issue.
+
Interoperability immutadâ—Źt uses plain JavaScript objects so you can access your data using standard ways. Moreover, it lets you freely enjoy your favorite libraries.
+
Exhaustive and yet extensible immutadâ—Źt comes with a large set of built-in utilities, mostly based on ES2015+ . You can also find a package called immutadot-lodash with some of lodash 's utilities. You haven't found what you're looking for? Do it yourself with the convert
feature.
+
Learning curve If you are already familiar with ES2015+ and lodash then you should be able to use immutadâ—Źt quickly.
Contributing We want contributing to immutadâ—Źt to be fun, enjoyable, and educational for anyone, and everyone.
Code of Conduct In the interest of fostering an open and welcoming environment, we have adopted a Code of Conduct that we expect project participants to commit to. Please read the full text so that you can understand what behavior will and will not be tolerated.
Contributing guide If you are interested in contributing to immutadâ—Źt, please read our contributing guide to learn more about how to suggest bugfixes and improvements.
diff --git a/docs/immutadot/1.0/lang.html b/docs/immutadot/1.0/lang.html
index 181fc6d2..416b57b0 100644
--- a/docs/immutadot/1.0/lang.html
+++ b/docs/immutadot/1.0/lang.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
@@ -328,6 +328,271 @@
Parameters:
+
Returns:
+
+
+
+ Returns the updated object.
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) and(object, path, […args] ) → {Object}
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Applies &&
between the former value and args
+
+
+
+
+
+
+
+
+
+
+ Examples
+
+ and({ nested: { prop: true } }, 'nested.prop', true) // { nested: { prop: true } }
+
+ and({ nested: { prop: true } }, 'nested.prop', true, false) // { nested: { prop: false } }
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+
+
+ object
+
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The object to modify.
+
+
+
+
+
+
+
+
+
+
+
+
+ path
+
+
+
+
+
+
+Array
+|
+
+string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The path of the property to set.
+
+
+
+
+
+
+
+
+
+
+
+
+ args
+
+
+
+
+
+
+*
+
+
+
+
+
+
+
+
+ optional
+
+
+
+
+
+ repeatable
+
+
+
+
+
+
+ Other operands.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
@@ -794,6 +1059,271 @@ Parameters:
+ Returns:
+
+
+
+ Returns the updated object.
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) or(object, path, […args] ) → {Object}
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Applies ||
between the former value and args
+
+
+
+
+
+
+
+
+
+
+ Examples
+
+ or({ nested: { prop: false } }, 'nested.prop', true) // { nested: { prop: true } }
+
+ or({ nested: { prop: true } }, 'nested.prop', false, false) // { nested: { prop: true } }
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+
+
+ object
+
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The object to modify.
+
+
+
+
+
+
+
+
+
+
+
+
+ path
+
+
+
+
+
+
+Array
+|
+
+string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The path of the property to set.
+
+
+
+
+
+
+
+
+
+
+
+
+ args
+
+
+
+
+
+
+*
+
+
+
+
+
+
+
+
+ optional
+
+
+
+
+
+ repeatable
+
+
+
+
+
+
+ Other operands.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
diff --git a/docs/immutadot/1.0/lang_add.js.html b/docs/immutadot/1.0/lang_add.js.html
index fec036da..47ed8798 100644
--- a/docs/immutadot/1.0/lang_add.js.html
+++ b/docs/immutadot/1.0/lang_add.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/lang_and.js.html b/docs/immutadot/1.0/lang_and.js.html
new file mode 100644
index 00000000..f78a9f59
--- /dev/null
+++ b/docs/immutadot/1.0/lang_and.js.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
lang/and.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ immutadâ—Źt Namespaces
+
+
+
+
+
lang/and.js
+
+
+
+
+
+
+
+
+
+ import { convert } from 'core/convert' const and = convert((v, ...args ) => args.reduce((acc, arg ) => acc && arg, v))export { and }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/immutadot/1.0/lang_divide.js.html b/docs/immutadot/1.0/lang_divide.js.html
index e3b3e962..cbf86609 100644
--- a/docs/immutadot/1.0/lang_divide.js.html
+++ b/docs/immutadot/1.0/lang_divide.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/lang_index.js.html b/docs/immutadot/1.0/lang_index.js.html
index 114a8a44..8e87baa3 100644
--- a/docs/immutadot/1.0/lang_index.js.html
+++ b/docs/immutadot/1.0/lang_index.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
@@ -35,7 +35,7 @@
lang/index.js
- export { add } from './add' export { divide } from './divide' export { multiply } from './multiply' export { subtract } from './subtract' export { toggle } from './toggle'
+ export { add } from './add' export { and } from './and' export { divide } from './divide' export { multiply } from './multiply' export { or } from './or' export { subtract } from './subtract' export { toggle } from './toggle'
diff --git a/docs/immutadot/1.0/lang_multiply.js.html b/docs/immutadot/1.0/lang_multiply.js.html
index 829d8ed1..9f7f91da 100644
--- a/docs/immutadot/1.0/lang_multiply.js.html
+++ b/docs/immutadot/1.0/lang_multiply.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/lang_or.js.html b/docs/immutadot/1.0/lang_or.js.html
new file mode 100644
index 00000000..820c4ec9
--- /dev/null
+++ b/docs/immutadot/1.0/lang_or.js.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
lang/or.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ immutadâ—Źt Namespaces
+
+
+
+
+
lang/or.js
+
+
+
+
+
+
+
+
+
+ import { convert } from 'core/convert' const or = convert((v, ...args ) => args.reduce((acc, arg ) => acc || arg, v))export { or }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/immutadot/1.0/lang_subtract.js.html b/docs/immutadot/1.0/lang_subtract.js.html
index 62f3db4d..f9fec8d4 100644
--- a/docs/immutadot/1.0/lang_subtract.js.html
+++ b/docs/immutadot/1.0/lang_subtract.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/lang_toggle.js.html b/docs/immutadot/1.0/lang_toggle.js.html
index 646d513e..8dec8c29 100644
--- a/docs/immutadot/1.0/lang_toggle.js.html
+++ b/docs/immutadot/1.0/lang_toggle.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/object.html b/docs/immutadot/1.0/object.html
index bc828523..1715dc94 100644
--- a/docs/immutadot/1.0/object.html
+++ b/docs/immutadot/1.0/object.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/object_assign.js.html b/docs/immutadot/1.0/object_assign.js.html
index f1566967..498eedf6 100644
--- a/docs/immutadot/1.0/object_assign.js.html
+++ b/docs/immutadot/1.0/object_assign.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/object_index.js.html b/docs/immutadot/1.0/object_index.js.html
index ed3611d8..9f6d7822 100644
--- a/docs/immutadot/1.0/object_index.js.html
+++ b/docs/immutadot/1.0/object_index.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/path.html b/docs/immutadot/1.0/path.html
deleted file mode 100644
index 431a4627..00000000
--- a/docs/immutadot/1.0/path.html
+++ /dev/null
@@ -1,323 +0,0 @@
-
-
-
-
-
-
path - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- immutadâ—Źt Namespaces
-
-
-
-
-
path
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
- Since:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Path functions.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Methods
-
-
-
-
-
-
- (static) toPath(arg) → {Array.<Array.<Symbol, ...*>>}
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
- Since:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Converts arg
to a path represented as an array of keys.
-arg
may be a string, in which case it will be parsed.
-It may also be an Array, in which case a copy of the array with values converted to path keys will be returned.
-If arg
is neither a string nor an Array, its string representation will be parsed.
-
-
-
-
-
-
-
-
-
-
- Example
-
- toPath('a.b[1]["."][1:-1]') // => [[prop, 'a'], [prop, 'b'], [index, 1], [prop, '.'], [slice, [1, -1]]]
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
-
-
- arg
-
-
-
-
-
-
-string
-|
-
-Array
-|
-
-*
-
-
-
-
-
-
-
-
-
- The value to convert
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- The path represented as an array of keys
-
-
-
-
-
-
- Type
-
-
-
-Array.<Array.<Symbol, ...*>>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/immutadot/1.0/path_index.js.html b/docs/immutadot/1.0/path_index.js.html
deleted file mode 100644
index 49320606..00000000
--- a/docs/immutadot/1.0/path_index.js.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
path/index.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- immutadâ—Źt Namespaces
-
-
-
-
-
path/index.js
-
-
-
-
-
-
-
-
-
- export { toPath } from './toPath'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/immutadot/1.0/path_toPath.js.html b/docs/immutadot/1.0/path_toPath.js.html
deleted file mode 100644
index a49b99dc..00000000
--- a/docs/immutadot/1.0/path_toPath.js.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
path/toPath.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- immutadâ—Źt Namespaces
-
-
-
-
-
path/toPath.js
-
-
-
-
-
-
-
-
-
- import { allProps, index, list, prop, slice, } from './consts' import { filter, map, race, regexp, } from './parser.utils' import { isIndex, isSliceIndex, } from './utils' import { isNil, toString, } from 'util/lang' const unescapeQuotes = (str, quote ) => str.replace(new RegExp (`\\\\${quote} ` , 'g' ), quote)const toSliceIndex = (str, defaultValue ) => str === '' ? defaultValue : Number (str)const isSliceIndexString = arg => isSliceIndex(arg ? Number (arg) : undefined )const allowingArrays = fn => arg => { if (Array .isArray(arg)) return arg return fn(arg) } const emptyStringParser = str => str.length === 0 ? [] : null const quotedBracketNotationParser = map( regexp(/^\[(['"])(.*?[^\\])\1\]?\.?(.*)$/ ), ([quote, property, rest]) => [[prop, unescapeQuotes(property, quote)], ...stringToPath(rest)], ) const incompleteQuotedBracketNotationParser = map( regexp(/^(\[["'][^.[{]*)\.?(.*)$/ ), ([beforeNewSegment, rest]) => [[prop, beforeNewSegment], ...stringToPath(rest)], ) const bareBracketNotationParser = map( regexp(/^\[([^\]]*)\]\.?(.*)$/ ), ([property, rest]) => { return isIndex(Number (property)) ? [[index, Number (property)], ...stringToPath(rest)] : [[prop, property], ...stringToPath(rest)] }, ) const incompleteBareBracketNotationParser = map( regexp(/^(\[[^.[{]*)\.?(.*)$/ ), ([beforeNewSegment, rest]) => [[prop, beforeNewSegment], ...stringToPath(rest)], ) const sliceNotationParser = map( filter( regexp(/^\[([^:\]]*):([^:\]]*)\]\.?(.*)$/ ), ([sliceStart, sliceEnd]) => isSliceIndexString(sliceStart) && isSliceIndexString(sliceEnd), ), ([sliceStart, sliceEnd, rest]) => [[slice, [toSliceIndex(sliceStart, 0 ), toSliceIndex(sliceEnd)]], ...stringToPath(rest)], ) const listWildCardParser = map( regexp(/^{\*}\.?(.*)$/ ), ([rest]) => [[allProps], ...stringToPath(rest)], ) const listPropRegexp = /^,?((?!["'])([^,]*)|(["'])(.*?[^\\])\3)(.*)/ function * extractListProps (rawProps ) { if (rawProps.startsWith(',' )) yield '' let remProps = rawProps while (remProps !== '' ) { const [, , bareProp, , quotedProp, rest] = listPropRegexp.exec(remProps) yield bareProp === undefined ? quotedProp : bareProp remProps = rest } } const listNotationParser = map( regexp(/^\{(((?!["'])[^,}]*|(["']).*?[^\\]\2)(,((?!["'])[^,}]*|(["']).*?[^\\]\6))*)\}\.?(.*)$/ ), ([rawProps, , , , , , rest]) => { const props = [...extractListProps(rawProps)] return props.length === 1 ? [[prop, props[0 ]], ...stringToPath(rest)] : [[list, props], ...stringToPath(rest)] }, ) const incompleteListNotationParser = map( regexp(/^(\{[^.[{]*)\.?(.*)$/ ), ([beforeNewSegment, rest]) => [[prop, beforeNewSegment], ...stringToPath(rest)], ) const pathSegmentEndedByNewSegment = map( regexp(/^([^.[{]*)\.?([[{]?.*)$/ ), ([beforeNewSegment, rest]) => [[prop, beforeNewSegment], ...stringToPath(rest)], ) const applyParsers = race([ emptyStringParser, quotedBracketNotationParser, incompleteQuotedBracketNotationParser, sliceNotationParser, bareBracketNotationParser, incompleteBareBracketNotationParser, listWildCardParser, listNotationParser, incompleteListNotationParser, pathSegmentEndedByNewSegment, ]) const stringToPath = arg => { if (isNil(arg)) return [] return applyParsers(toString(arg)) } const MAX_CACHE_SIZE = 1000 const cache = new Map ()const memoizedStringToPath = str => { if (cache.has(str)) return cache.get(str) const path = stringToPath(str) if (cache.size === MAX_CACHE_SIZE) cache.clear() cache.set(str, path) return path } const toPath = allowingArrays(arg => [...memoizedStringToPath(arg)])const unsafeToPath = allowingArrays(memoizedStringToPath)export { toPath, unsafeToPath }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/immutadot/1.0/string.html b/docs/immutadot/1.0/string.html
index 67b9b817..bbc11003 100644
--- a/docs/immutadot/1.0/string.html
+++ b/docs/immutadot/1.0/string.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_concat.js.html b/docs/immutadot/1.0/string_concat.js.html
index 49cd5c96..c5c51823 100644
--- a/docs/immutadot/1.0/string_concat.js.html
+++ b/docs/immutadot/1.0/string_concat.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_index.js.html b/docs/immutadot/1.0/string_index.js.html
index 5d54cbf4..5c20ca71 100644
--- a/docs/immutadot/1.0/string_index.js.html
+++ b/docs/immutadot/1.0/string_index.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_padEnd.js.html b/docs/immutadot/1.0/string_padEnd.js.html
index 03e8aecd..5365350d 100644
--- a/docs/immutadot/1.0/string_padEnd.js.html
+++ b/docs/immutadot/1.0/string_padEnd.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_padStart.js.html b/docs/immutadot/1.0/string_padStart.js.html
index 9c0ee1d4..f796b12b 100644
--- a/docs/immutadot/1.0/string_padStart.js.html
+++ b/docs/immutadot/1.0/string_padStart.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_replace.js.html b/docs/immutadot/1.0/string_replace.js.html
index 973c1263..8518f055 100644
--- a/docs/immutadot/1.0/string_replace.js.html
+++ b/docs/immutadot/1.0/string_replace.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_slice.js.html b/docs/immutadot/1.0/string_slice.js.html
index 9008d938..1ea7ebbe 100644
--- a/docs/immutadot/1.0/string_slice.js.html
+++ b/docs/immutadot/1.0/string_slice.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_substr.js.html b/docs/immutadot/1.0/string_substr.js.html
index 677186b4..9aba1ad3 100644
--- a/docs/immutadot/1.0/string_substr.js.html
+++ b/docs/immutadot/1.0/string_substr.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_substring.js.html b/docs/immutadot/1.0/string_substring.js.html
index adecb3df..95941e07 100644
--- a/docs/immutadot/1.0/string_substring.js.html
+++ b/docs/immutadot/1.0/string_substring.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_toLocaleLowerCase.js.html b/docs/immutadot/1.0/string_toLocaleLowerCase.js.html
index 6df75f3c..57fd3d9a 100644
--- a/docs/immutadot/1.0/string_toLocaleLowerCase.js.html
+++ b/docs/immutadot/1.0/string_toLocaleLowerCase.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_toLocaleUpperCase.js.html b/docs/immutadot/1.0/string_toLocaleUpperCase.js.html
index 904440d8..e54d0b2d 100644
--- a/docs/immutadot/1.0/string_toLocaleUpperCase.js.html
+++ b/docs/immutadot/1.0/string_toLocaleUpperCase.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_toLowerCase.js.html b/docs/immutadot/1.0/string_toLowerCase.js.html
index 41cfceb5..6d66f016 100644
--- a/docs/immutadot/1.0/string_toLowerCase.js.html
+++ b/docs/immutadot/1.0/string_toLowerCase.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_toUpperCase.js.html b/docs/immutadot/1.0/string_toUpperCase.js.html
index cd2e96b8..a4725ed6 100644
--- a/docs/immutadot/1.0/string_toUpperCase.js.html
+++ b/docs/immutadot/1.0/string_toUpperCase.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_trim.js.html b/docs/immutadot/1.0/string_trim.js.html
index 3e3a47b4..5238a85c 100644
--- a/docs/immutadot/1.0/string_trim.js.html
+++ b/docs/immutadot/1.0/string_trim.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_trimLeft.js.html b/docs/immutadot/1.0/string_trimLeft.js.html
index abf2f3fb..472ed6ab 100644
--- a/docs/immutadot/1.0/string_trimLeft.js.html
+++ b/docs/immutadot/1.0/string_trimLeft.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/string_trimRight.js.html b/docs/immutadot/1.0/string_trimRight.js.html
index f8d64f3c..0a470b1a 100644
--- a/docs/immutadot/1.0/string_trimRight.js.html
+++ b/docs/immutadot/1.0/string_trimRight.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/docs/immutadot/1.0/util_protect.js.html b/docs/immutadot/1.0/util_protect.js.html
index 7957f340..b947153b 100644
--- a/docs/immutadot/1.0/util_protect.js.html
+++ b/docs/immutadot/1.0/util_protect.js.html
@@ -20,7 +20,7 @@
- immutadâ—Źt Namespaces
+ immutadâ—Źt Namespaces
diff --git a/lerna.json b/lerna.json
index 0c8acbf2..f26908c6 100644
--- a/lerna.json
+++ b/lerna.json
@@ -5,5 +5,5 @@
"packages/*"
],
"useWorkspaces": true,
- "version": "1.0.0-rc.7"
+ "version": "1.0.0"
}
diff --git a/package.json b/package.json
index d1e811b1..c82d84de 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "immutadot",
- "version": "1.0.0-rc.7",
+ "version": "1.0.0",
"license": "MIT",
"private": true,
"scripts": {
diff --git a/packages/immutadot-benchmark/package.json b/packages/immutadot-benchmark/package.json
index 5180d158..1d4b6d8e 100644
--- a/packages/immutadot-benchmark/package.json
+++ b/packages/immutadot-benchmark/package.json
@@ -1,13 +1,13 @@
{
"name": "immutadot-benchmark",
- "version": "1.0.0-rc.7",
+ "version": "1.0.0",
"private": "true",
"license": "MIT",
"devDependencies": {
"cross-env": "~5.1.3",
"immer": "~0.8.2",
"immutable": "~3.8.2",
- "immutadot": "~1.0.0-rc.7",
+ "immutadot": "~1.0.0",
"jest": "~21.2.1",
"lerna": "~2.8.0"
},
diff --git a/packages/immutadot-lodash/package.json b/packages/immutadot-lodash/package.json
index af521bfa..ec3fbf56 100644
--- a/packages/immutadot-lodash/package.json
+++ b/packages/immutadot-lodash/package.json
@@ -1,6 +1,6 @@
{
"name": "immutadot-lodash",
- "version": "1.0.0-rc.7",
+ "version": "1.0.0",
"description": "immutadot-lodash is an extension to immutadot, adding functions based on lodash.",
"keywords": [
"immutable",
@@ -22,7 +22,7 @@
"Charles-Henri GUÉRIN (https://github.com/charlyx)"
],
"peerDependencies": {
- "immutadot": "^1.0.0-rc.7",
+ "immutadot": "^1.0.0",
"lodash": "^4.6.0"
},
"devDependencies": {
diff --git a/packages/immutadot/package.json b/packages/immutadot/package.json
index d040c3c4..094523d1 100644
--- a/packages/immutadot/package.json
+++ b/packages/immutadot/package.json
@@ -1,6 +1,6 @@
{
"name": "immutadot",
- "version": "1.0.0-rc.7",
+ "version": "1.0.0",
"description": "immutadâ—Źt (pronounced immutadot) is a set of immutable functions using dot notation.",
"keywords": [
"immutable",