mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2025-01-12 05:58:23 +01:00
Add findAllIndexes Array extension
This commit is contained in:
parent
414b0a3b16
commit
1119c6c9e5
@ -6,4 +6,13 @@ if (!Array.prototype.findAsync) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!Array.prototype.findAllIndexes) {
|
||||||
|
Array.prototype.findAllIndexes = function (Callback) {
|
||||||
|
this.reduce(function(a, e, i) {
|
||||||
|
if (Callback(e))
|
||||||
|
a.push(i)
|
||||||
|
return a
|
||||||
|
}, [])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user