check-esm
Version:
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
26 lines (21 loc) • 760 B
JavaScript
/**
*
* Package:
* Author: Ganesh B
* Description: 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
* Install: npm i get-imported --save
* Github: https://github.com/ganeshkbhat/get-imports
* npmjs Link: https://www.npmjs.com/package/get-imported
* File: demos/parser.imports.regex.extended.js
* File Description:
*
*/
/* eslint no-console: 0 */
;
const parser = require("../index.js");
const path = import('path');
const someModuleCJS = import('./file.cjs');
const someModuleJS = import('./file.js');
const acorn = import("chai");
let arr = parser._importRegexExtended("./demos/parser.imports.regex.extended.js");
console.log(arr);