@nidomiro/node-modulesystem-check
v1.0.5
Published
Check which module-system your code is running on.
Downloads
5
Maintainers
Readme
Node Modulesystem Check
This package is a simple check for the node modulesystem. It checks if your code is run in commonjs or esm mode.
Installation
npm install @nidomiro/node-modulesystem-check
Usage
CommonJs
const { getModuleSystem } = require("@nidomiro/node-modulesystem-check");
getModuleSystem() // === "commonjs";
ESM
import { getModuleSystem } from "@nidomiro/node-modulesystem-check";
getModuleSystem() // === "esm";