|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
380 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | /** @type {import('.').AsyncFunctionConstructor | false} */
|
|---|
| 4 | var cached;
|
|---|
| 5 |
|
|---|
| 6 | /** @type {import('.')} */
|
|---|
| 7 | module.exports = function getAsyncFunction() {
|
|---|
| 8 | if (typeof cached === 'undefined') {
|
|---|
| 9 | try {
|
|---|
| 10 | // eslint-disable-next-line no-new-func
|
|---|
| 11 | cached = Function('return async function () {}')().constructor;
|
|---|
| 12 | } catch (e) {
|
|---|
| 13 | cached = false;
|
|---|
| 14 | }
|
|---|
| 15 | }
|
|---|
| 16 | return cached;
|
|---|
| 17 | };
|
|---|
| 18 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.