mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Apply let/const transform.
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
* @returns {Array} Returns the new filtered array.
|
||||
*/
|
||||
function arrayFilter(array, predicate) {
|
||||
var index = -1,
|
||||
length = array == null ? 0 : array.length,
|
||||
resIndex = 0,
|
||||
result = [];
|
||||
let index = -1;
|
||||
let resIndex = 0;
|
||||
const length = array == null ? 0 : array.length;
|
||||
const result = [];
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
const value = array[index];
|
||||
if (predicate(value, index, array)) {
|
||||
result[resIndex++] = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user