mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Apply even more let/const transforms.
This commit is contained in:
10
remove.js
10
remove.js
@@ -30,17 +30,17 @@ import basePullAt from './_basePullAt.js';
|
||||
* // => [2, 4]
|
||||
*/
|
||||
function remove(array, predicate) {
|
||||
var result = [];
|
||||
const result = [];
|
||||
if (!(array && array.length)) {
|
||||
return result;
|
||||
}
|
||||
var index = -1,
|
||||
indexes = [],
|
||||
length = array.length;
|
||||
let index = -1;
|
||||
const indexes = [];
|
||||
const length = array.length;
|
||||
|
||||
predicate = baseIteratee(predicate, 3);
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
const value = array[index];
|
||||
if (predicate(value, index, array)) {
|
||||
result.push(value);
|
||||
indexes.push(index);
|
||||
|
||||
Reference in New Issue
Block a user