6 lines
158 B
JavaScript
6 lines
158 B
JavaScript
const ComparisonAsyncFunction = (async () => {}).constructor;
|
|
|
|
export default function isAsyncFunction(fn) {
|
|
return fn instanceof ComparisonAsyncFunction;
|
|
}
|