moduletype
Pass in the string representation of a file to get the file's module pattern. `moduletype` returns the module pattern type used by a script, for example 'cjs' or 'esm'.
Pass in the string representation of a file to get the file's module pattern. `moduletype` returns the module pattern type used by a script, for example 'cjs' or 'esm'.
The module has JS functions to check all imports or required modules and check if the file is a ES Module or a CJS/ JS Module or Script
The module has JS functions to check all imports or required modules and check if the file is a ES Module or a CJS/ JS Module or Script