Provide utilities to use regex based static analyzes detecting if potentially ESM or CommonJS syntax is used in a code
hasESMSyntax(code: string, id?: string) (note: dynamic import is not esm syntax`
hasCJSSyntax(code: string, id?: string)
detectSyntax(code: string, id?: string): esm | cjs | mixed | unknown
Some reference: https://github.com/unjs/jiti/blob/main/src/utils.ts#L27
Provide utilities to use regex based static analyzes detecting if potentially ESM or CommonJS syntax is used in a code
hasESMSyntax(code: string, id?: string)(note: dynamic import is not esm syntax`hasCJSSyntax(code: string, id?: string)detectSyntax(code: string, id?: string): esm | cjs | mixed | unknownSome reference: https://github.com/unjs/jiti/blob/main/src/utils.ts#L27