Travis build: 1043

This commit is contained in:
30secondsofcode
2019-03-05 18:13:20 +00:00
parent 33d90b2bf1
commit 1936064932
8 changed files with 32 additions and 32 deletions

View File

@ -260,7 +260,7 @@ const difference = (a, b) => {
};
const differenceBy = (a, b, fn) => {
const s = new Set(b.map(fn));
return a.filter(x => !s.has(fn(x)));
return a.map(fn).filter(el => !s.has(el));
};
const differenceWith = (arr, val, comp) => arr.filter(a => val.findIndex(b => comp(a, b)) === -1);
const dig = (obj, target) =>
@ -341,8 +341,8 @@ const extendHex = shortHex =>
const factorial = n =>
n < 0
? (() => {
throw new TypeError('Negative numbers are not allowed!');
})()
throw new TypeError('Negative numbers are not allowed!');
})()
: n <= 1
? 1
: n * factorial(n - 1);
@ -990,9 +990,9 @@ const reject = (pred, array) => array.filter((...args) => !pred(...args));
const remove = (arr, func) =>
Array.isArray(arr)
? arr.filter(func).reduce((acc, val) => {
arr.splice(arr.indexOf(val), 1);
return acc.concat(val);
}, [])
arr.splice(arr.indexOf(val), 1);
return acc.concat(val);
}, [])
: [];
const removeNonASCII = str => str.replace(/[^\x20-\x7E]/g, '');
const renameKeys = (keysMap, obj) =>