Travis build: 1045 [cron]
This commit is contained in:
4
dist/_30s.es5.js
vendored
4
dist/_30s.es5.js
vendored
@ -621,8 +621,8 @@
|
||||
};
|
||||
var differenceBy = function differenceBy(a, b, fn) {
|
||||
var s = new Set(b.map(fn));
|
||||
return a.filter(function (x) {
|
||||
return !s.has(fn(x));
|
||||
return a.map(fn).filter(function (el) {
|
||||
return !s.has(el);
|
||||
});
|
||||
};
|
||||
var differenceWith = function differenceWith(arr, val, comp) {
|
||||
|
||||
2
dist/_30s.es5.min.js
vendored
2
dist/_30s.es5.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/_30s.esm.js
vendored
2
dist/_30s.esm.js
vendored
@ -257,7 +257,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) =>
|
||||
|
||||
2
dist/_30s.js
vendored
2
dist/_30s.js
vendored
@ -263,7 +263,7 @@
|
||||
};
|
||||
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) =>
|
||||
|
||||
@ -911,7 +911,7 @@
|
||||
"archived": false
|
||||
},
|
||||
"meta": {
|
||||
"hash": "92abc752f5d3a659467e3dde7a3890000f4b72d1fdfd66086092494b688506ae"
|
||||
"hash": "01f5f57c5b2663808e733b98e13dfd47d501ab010e681dd49219548816d1a3d0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1162,7 +1162,7 @@
|
||||
"archived": false
|
||||
},
|
||||
"meta": {
|
||||
"hash": "383ed61e69b8f63ae42d0746a1995057f4f65b4af6ca7778d8f1771144802acd"
|
||||
"hash": "319e1a8fb41490965ee6e28db3e139e65c4ea5b7f43e332bc7216cd790e5d409"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -3391,7 +3391,7 @@
|
||||
"archived": false
|
||||
},
|
||||
"meta": {
|
||||
"hash": "4815876fd6dbb17ad34c0d8918e7a72d837104f9beee7dc51b0fa73057b9e83e"
|
||||
"hash": "dcdf66e8d0eb4a1761c6b767b8cc350757087ae817ec371436faab0fff7c0051"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -3763,7 +3763,7 @@
|
||||
"archived": false
|
||||
},
|
||||
"meta": {
|
||||
"hash": "ec9cb9384817f84cf0bacd62a23b69b2304fa2cf0352b16d3950b21d48c04f11"
|
||||
"hash": "2fd54c9fc1fb5b0a981df69501b518d5830ea77544d4d5290c7cc13745ca00ea"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -1331,11 +1331,11 @@
|
||||
"type": "snippet",
|
||||
"attributes": {
|
||||
"fileName": "differenceBy.md",
|
||||
"text": "Returns the difference between two arrays, after applying the provided function to each array element of both.\n\nCreate a `Set` by applying `fn` to each element in `b`, then use `Array.prototype.filter()` in combination with `fn` on `a` to only keep values not contained in the previously created set.",
|
||||
"text": "Returns the difference between two arrays, after applying the provided function to each array element of both.\n\nCreate a `Set` by applying `fn` to each element in `b`, then use `Array.prototype.map()` to apply `fn` to each element in `a`, then `Array.prototype.filter()`",
|
||||
"codeBlocks": {
|
||||
"es6": "const differenceBy = (a, b, fn) => {\n const s = new Set(b.map(fn));\n return a.filter(x => !s.has(fn(x)));\n};",
|
||||
"es5": "var differenceBy = function differenceBy(a, b, fn) {\n var s = new Set(b.map(fn));\n return a.filter(function (x) {\n return !s.has(fn(x));\n });\n};",
|
||||
"example": "differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); // [1.2]\ndifferenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x); // [ { x: 2 } ]"
|
||||
"es6": "const differenceBy = (a, b, fn) => {\n const s = new Set(b.map(fn));\n return a.map(fn).filter(el => !s.has(el));\n};",
|
||||
"es5": "var differenceBy = function differenceBy(a, b, fn) {\n var s = new Set(b.map(fn));\n return a.map(fn).filter(function (el) {\n return !s.has(el);\n });\n};",
|
||||
"example": "differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); // [1]\ndifferenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x); // [2]"
|
||||
},
|
||||
"tags": [
|
||||
"array",
|
||||
@ -1345,7 +1345,7 @@
|
||||
},
|
||||
"meta": {
|
||||
"archived": false,
|
||||
"hash": "92abc752f5d3a659467e3dde7a3890000f4b72d1fdfd66086092494b688506ae"
|
||||
"hash": "01f5f57c5b2663808e733b98e13dfd47d501ab010e681dd49219548816d1a3d0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1715,7 +1715,7 @@
|
||||
},
|
||||
"meta": {
|
||||
"archived": false,
|
||||
"hash": "383ed61e69b8f63ae42d0746a1995057f4f65b4af6ca7778d8f1771144802acd"
|
||||
"hash": "319e1a8fb41490965ee6e28db3e139e65c4ea5b7f43e332bc7216cd790e5d409"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -4983,7 +4983,7 @@
|
||||
"codeBlocks": {
|
||||
"es6": "const pipeAsyncFunctions = (...fns) => arg => fns.reduce((p, f) => p.then(f), Promise.resolve(arg));",
|
||||
"es5": "var pipeAsyncFunctions = function pipeAsyncFunctions() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (arg) {\n return fns.reduce(function (p, f) {\n return p.then(f);\n }, Promise.resolve(arg));\n };\n};",
|
||||
"example": "const sum = pipeAsyncFunctions(\n x => x + 1,\n x => new Promise(resolve => setTimeout(() => resolve(x + 2), 1000)),\n x => x + 3,\n async x => (await x) + 4\n);\n(async() => {\n console.log(await sum(5)); // 15 (after one second)\n})();"
|
||||
"example": "const sum = pipeAsyncFunctions(\n x => x + 1,\n x => new Promise(resolve => setTimeout(() => resolve(x + 2), 1000)),\n x => x + 3,\n async x => (await x) + 4\n);\n(async () => {\n console.log(await sum(5)); // 15 (after one second)\n})();"
|
||||
},
|
||||
"tags": [
|
||||
"adapter",
|
||||
@ -4994,7 +4994,7 @@
|
||||
},
|
||||
"meta": {
|
||||
"archived": false,
|
||||
"hash": "4815876fd6dbb17ad34c0d8918e7a72d837104f9beee7dc51b0fa73057b9e83e"
|
||||
"hash": "dcdf66e8d0eb4a1761c6b767b8cc350757087ae817ec371436faab0fff7c0051"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -5541,7 +5541,7 @@
|
||||
},
|
||||
"meta": {
|
||||
"archived": false,
|
||||
"hash": "ec9cb9384817f84cf0bacd62a23b69b2304fa2cf0352b16d3950b21d48c04f11"
|
||||
"hash": "2fd54c9fc1fb5b0a981df69501b518d5830ea77544d4d5290c7cc13745ca00ea"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -595,10 +595,10 @@
|
||||
"body": [
|
||||
"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));",
|
||||
"};"
|
||||
],
|
||||
"description": "Returns the difference between two arrays, after applying the provided function to each array element of both.\n\nCreate a `Set` by applying `fn` to each element in `b`, then use `Array.prototype.filter()` in combination with `fn` on `a` to only keep values not contained in the previously created set"
|
||||
"description": "Returns the difference between two arrays, after applying the provided function to each array element of both.\n\nCreate a `Set` by applying `fn` to each element in `b`, then use `Array.prototype.map()` to apply `fn` to each element in `a`, then `Array.prototype.filter()"
|
||||
},
|
||||
"differenceWith": {
|
||||
"prefix": "30s_differenceWith",
|
||||
|
||||
Reference in New Issue
Block a user