Travis build: 1737

This commit is contained in:
30secondsofcode
2020-01-30 19:37:05 +00:00
parent 13eda7be52
commit 0a709f6e99
9 changed files with 72 additions and 75 deletions

View File

@ -1785,8 +1785,8 @@
" i === arr.length - 2",
" ? acc + val + end",
" : i === arr.length - 1",
" ? acc + val",
" : acc + val + separator,",
" ? acc + val",
" : acc + val + separator,",
" ''",
" );"
],
@ -2128,10 +2128,10 @@
"const objectToQueryString = queryParameters => {",
" return queryParameters",
" ? Object.entries(queryParameters).reduce((queryString, [key, val], index) => {",
" const symbol = queryString.length === 0 ? '?' : '&';",
" queryString += typeof val === 'string' ? `${symbol}${key}=${val}` : '';",
" return queryString;",
" }, '')",
" const symbol = queryString.length === 0 ? '?' : '&';",
" queryString += typeof val === 'string' ? `${symbol}${key}=${val}` : '';",
" return queryString;",
" }, '')",
" : '';",
"};"
],
@ -2645,9 +2645,9 @@
"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);",
" }, [])",
" : [];"
],
"description": "Removes elements from an array for which the given function returns `false`.\n\nUse `Array.prototype.filter()` to find array elements that return truthy values and `Array.prototype.reduce()` to remove elements using `Array.prototype.splice()`.\nThe `func` is invoked with three arguments (`value, index, array`).\n"
@ -2845,10 +2845,10 @@
" Array.isArray(val)",
" ? val.length",
" : val && typeof val === 'object'",
" ? val.size || val.length || Object.keys(val).length",
" : typeof val === 'string'",
" ? new Blob([val]).size",
" : 0;"
" ? val.size || val.length || Object.keys(val).length",
" : typeof val === 'string'",
" ? new Blob([val]).size",
" : 0;"
],
"description": "Gets the size of an array, object or string.\n\nGet type of `val` (`array`, `object` or `string`). \nUse `length` property for arrays.\nUse `length` or `size` value if available or number of keys for objects.\nUse `size` of a [`Blob` object](https://developer.mozilla.org/en-US/docs/Web/API/Blob) created from `val` for strings.\nSplit strings into array of characters with `split('')` and return its length.\n"
},