mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-09 07:33:52 +01:00
9 lines
215 B
JavaScript
9 lines
215 B
JavaScript
|
if (!Array.prototype.findAsync) {
|
||
|
Array.prototype.findAsync = async function findAsync(asyncCallback) {
|
||
|
for (const item of this) {
|
||
|
if (await asyncCallback(item)) {
|
||
|
return item
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|