-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from thibmaek/release/1.13.0
Release/1.13.0
- Loading branch information
Showing
33 changed files
with
4,977 additions
and
2,310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
template: | | ||
## What's Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"pre-push": "npm test" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"ignore": [ | ||
"package-lock.json" | ||
], | ||
"linters": { | ||
"**/*.js": [ | ||
"eslint --fix", | ||
"git add" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,21 @@ | ||
import diff from './diff'; | ||
import filterEven from './filterEven'; | ||
import filterFalsies from './filterFalsies'; | ||
import flatten from './flatten'; | ||
import getDuplicates from './getDuplicates'; | ||
import groupBy from './groupBy'; | ||
import head from './head'; | ||
import initial from './initial'; | ||
import intersect from './intersect'; | ||
import isEmpty from './isEmpty'; | ||
import join from './join'; | ||
import last from './last'; | ||
import median from './median'; | ||
import pickRandom from './pickRandom'; | ||
import randomize from './randomize'; | ||
import sortBy from './sortBy'; | ||
import tail from './tail'; | ||
import total from './total'; | ||
import unique from './unique'; | ||
import without from './without'; | ||
import zip from './zip'; | ||
|
||
export default { | ||
diff, | ||
difference: diff, | ||
duplicates: getDuplicates, | ||
empty: isEmpty, | ||
filterEven, | ||
filterFalsies, | ||
flatten, | ||
getDuplicates, | ||
groupBy, | ||
head, | ||
initial, | ||
intersect, | ||
intersection: intersect, | ||
isEmpty, | ||
join, | ||
last, | ||
median, | ||
pickRandom, | ||
randomize, | ||
sortBy, | ||
tail, | ||
total, | ||
unique, | ||
without, | ||
zip, | ||
}; | ||
export { default as diff } from './diff'; | ||
export { default as filterEven } from './filterEven'; | ||
export { default as filterFalsies } from './filterFalsies'; | ||
export { default as flatten } from './flatten'; | ||
export { default as getDuplicates } from './getDuplicates'; | ||
export { default as groupBy } from './groupBy'; | ||
export { default as head } from './head'; | ||
export { default as initial } from './initial'; | ||
export { default as intersect } from './intersect'; | ||
export { default as isEmpty } from './isEmpty'; | ||
export { default as join } from './join'; | ||
export { default as last } from './last'; | ||
export { default as median } from './median'; | ||
export { default as pickRandom } from './pickRandom'; | ||
export { default as randomize } from './randomize'; | ||
export { default as sortBy } from './sortBy'; | ||
export { default as tail } from './tail'; | ||
export { default as total } from './total'; | ||
export { default as unique } from './unique'; | ||
export { default as without } from './without'; | ||
export { default as zip } from './zip'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
import mapPromise from './mapPromise'; | ||
import sleep from './sleep'; | ||
import throttle from './throttle'; | ||
|
||
export default { | ||
map: mapPromise, | ||
sleep, | ||
takeAtLeast: throttle, | ||
throttle, | ||
}; | ||
export { default as map } from './mapPromise'; | ||
export { default as forEach } from './forEach'; | ||
export { default as sleep } from './sleep'; | ||
export { default as throttle } from './throttle'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
import convertToDateIfNeeded from './convertToDateIfNeeded'; | ||
import isDate from './isDate'; | ||
|
||
export default { | ||
convertToDate: convertToDateIfNeeded, | ||
isDate, | ||
}; | ||
export { default as convertToDateIfNeeded } from './convertToDateIfNeeded'; | ||
export { default as isDate } from './isDate'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
import always from './always'; | ||
import compose from './compose'; | ||
import merge from './merge'; | ||
import requireArgs from './requireArgs'; | ||
|
||
export default { | ||
always, | ||
compose, | ||
converge: merge, | ||
merge, | ||
requireArgs, | ||
}; | ||
export { default as always } from './always'; | ||
export { default as compose } from './compose'; | ||
export { default as merge } from './merge'; | ||
export { default as requireArgs } from './requireArgs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
import entries from './entries'; | ||
|
||
export default { | ||
entries, | ||
}; | ||
export { default as entries } from './entries'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
import deepClone from './deepClone'; | ||
|
||
export default { | ||
deepClone, | ||
}; | ||
export { default as deepClone } from './deepClone'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
import isEven from './isEven'; | ||
import isNumber from './isNumber'; | ||
|
||
export default { | ||
isEven, | ||
isNumber, | ||
}; | ||
export { default as isEven } from './isEven'; | ||
export { default as isNumber } from './isNumber'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import deepCopy from '../deepCopy'; | ||
|
||
const obj1 = { a: 1, b: { c: { d: [4] } } }; | ||
const arr1 = [{ ...obj1 }, [{ d: [{ c: 3 }] }]]; | ||
|
||
describe(`[Objects]: deepCopy`, () => { | ||
it(`should make a deep copy of an object`, () => { | ||
const cp = deepCopy(obj1); | ||
expect(cp).toEqual(obj1); | ||
|
||
obj1.b.c = 2; | ||
expect(cp).not.toEqual(obj1); | ||
}); | ||
it(`should also work on arrays`, () => { | ||
const cp = deepCopy(arr1); | ||
expect(cp).toEqual(arr1); | ||
|
||
arr1[0] = null; | ||
arr1[1].d = 4; | ||
expect(cp).not.toEqual(arr1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
const deepCopy = obj => { | ||
if (typeof obj === `object` && !Array.isArray(obj)) { | ||
return Object.keys(obj) | ||
.map(k => ({ [k]: deepCopy(obj[k]) })) | ||
.reduce((a, b) => Object.assign(a, b), {}); | ||
} else if (Array.isArray(obj)) { | ||
return obj.map(deepCopy); | ||
} | ||
|
||
return obj; | ||
}; | ||
export default deepCopy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
import deepMerge from './deepMerge'; | ||
import getMappedArray from './getMappedArray'; | ||
import getQueryString from './getQueryString'; | ||
import isEmpty from './isEmpty'; | ||
import makeImmutable from './makeImmutable'; | ||
import makeIterable from './makeIterable'; | ||
import parseJSON from './parseJSON'; | ||
import pluckDeep from './pluckDeep'; | ||
|
||
export default { | ||
deepMerge, | ||
empty: isEmpty, | ||
getMappedArray, | ||
getQueryString, | ||
isEmpty, | ||
makeImmutable, | ||
makeIterable, | ||
parseJSON, | ||
pluckDeep, | ||
}; | ||
export { default as deepCopy } from './deepCopy'; | ||
export { default as deepMerge } from './deepMerge'; | ||
export { default as getMappedArray } from './getMappedArray'; | ||
export { default as getQueryString } from './getQueryString'; | ||
export { default as isEmpty } from './isEmpty'; | ||
export { default as makeImmutable } from './makeImmutable'; | ||
export { default as makeIterable } from './makeIterable'; | ||
export { default as parseJSON } from './parseJSON'; | ||
export { default as pluckDeep } from './pluckDeep'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { default as diff } from './diff'; | ||
export { default as intersect } from './intersect'; | ||
export { default as join } from './join'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
import capitalize from './capitalize'; | ||
import ellipsize from './ellipsize'; | ||
import isEmpty from './isEmpty'; | ||
|
||
export default { | ||
capitalize, | ||
ellipsize, | ||
empty: isEmpty, | ||
isEmpty, | ||
trunc: ellipsize, | ||
truncate: ellipsize, | ||
}; | ||
export { default as capitalize } from './capitalize'; | ||
export { default as ellipsize } from './ellipsize'; | ||
export { default as isEmpty } from './isEmpty'; |
Oops, something went wrong.