UNPKG

rajt

Version:

A serverless bundler layer, fully typed for AWS Lambda (Node.js and LLRT) and Cloudflare Workers.

9 lines (7 loc) 252 B
export const isAsyncFn = (fn: any) => { return fn?.constructor?.name === 'AsyncFunction' || fn.toString().toLowerCase().trim().startsWith('async') } export const isAnonFn = (fn: any) => { return fn?.name === '' || fn?.name === 'anonymous' }