Skip to content

Commit

Permalink
Updated docs, changed version to 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz-pluszczewski committed Jan 22, 2018
1 parent 04b98d6 commit d3d8ee4
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 25 deletions.
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@

#### 1.4.1
- Updated docs for immutableDelete and filter

#### 1.4.2
- Updated docs
4 changes: 2 additions & 2 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ console.log(arr2); // ['one', 'two']
import { shift } from 'perfect-immutable';

const arr1 = ['one', 'two', 'three'];
const arr2 = pop(arr1);
const arr2 = shift(arr1);

console.log(arr1); // ['one', 'two', 'three']
console.log(arr2); // ['two', 'three']
Expand All @@ -132,7 +132,7 @@ console.log(arr2); // ['two', 'three']
import { unshift } from 'perfect-immutable';

const arr1 = ['three', 'four'];
const arr2 = pop(arr1, 'one', 'two');
const arr2 = unshift(arr1, 'one', 'two');

console.log(arr1); // ['three', 'four']
console.log(arr2); // ['one', 'two', 'three', 'four']
Expand Down
20 changes: 10 additions & 10 deletions lib/perfect-immutable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/perfect-immutable.js.map

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions lib/perfect-immutable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -280,28 +280,28 @@ var immutableReverse = function immutableReverse(arr) {

/**
* Creates new array or object with one element removed
* @param {array|object} val source array|object
* @param {array|object} source array|object
* @param {number|string} index of element we want to be removed
* @return {array|object} new array|object with one element removed
*/
var immutableDelete$1 = function immutableDelete(val, index) {
if (Array.isArray(val)) {
return val.slice(0, index).concat(val.slice(index + 1));
var immutableDelete$1 = function immutableDelete(source, index) {
if (Array.isArray(source)) {
return source.slice(0, index).concat(source.slice(index + 1));
}
var removed = val[index],
rest = objectWithoutProperties(val, [index]); // eslint-disable-line no-unused-vars
var removed = source[index],
rest = objectWithoutProperties(source, [index]); // eslint-disable-line no-unused-vars

return rest;
};

/**
* Returns new, array only with elements predicate returns truthy for
* @param {array} arr source array
* @param {array|object} source array or object
* @param {function} predicate function invoked per iteration
* @return {array} new, filtered array
* @return {array|object} new, filtered array or object
*/
var immutableFilter = function immutableFilter(arr, predicate) {
return filter(arr, predicate);
var immutableFilter = function immutableFilter(source, predicate) {
return filter(source, predicate);
};

var set$2 = function set(path, value, setFunction) {
Expand Down
2 changes: 1 addition & 1 deletion lib/perfect-immutable.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perfect-immutable",
"version": "1.4.1",
"version": "1.4.2",
"description": "Library to provide immutable methods (like immutable set similar to lodash's _.set) on standard JS objects",
"repository": {
"type": "git",
Expand Down

0 comments on commit d3d8ee4

Please sign in to comment.