|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
317 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 3 | function isPending(promise, timeout = 100) {
|
|---|
| 4 | return Promise.race([
|
|---|
| 5 | promise.then(() => false).catch(() => false),
|
|---|
| 6 | new Promise((resolve) => setTimeout(() => resolve(true), timeout)),
|
|---|
| 7 | ]);
|
|---|
| 8 | }
|
|---|
| 9 | exports.default = isPending;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.