MCPcopy
hub / github.com/caolan/async / supportsAsync

Function supportsAsync

lib/internal/wrapAsync.js:6–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4var supportsSymbol = typeof Symbol === 'function';
5
6function supportsAsync() {
7 var supported;
8 try {
9 /* eslint no-eval: 0 */
10 supported = isAsync(eval('(async function () {})'));
11 } catch (e) {
12 supported = false;
13 }
14 return supported;
15}
16
17function isAsync(fn) {
18 return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';

Callers 2

wrapAsync.jsFile · 0.85
asyncFunctions.jsFile · 0.85

Calls 1

isAsyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…