mneme
v0.1.1-alpha.2
Published
Hybrid NPM Module for ESM and CommonJS
Downloads
1
Maintainers
Readme
mneme
Hybrid NPM Module for ESM and CommonJS
Install
npm i mneme
Usage
NodeJS
- ES Module
// package.json
{
"type": "module"
}
// app.js
import { mneme } from "mneme";
console.log(mneme); //=> Hello from mneme!
- CommonJS
const { mneme } = require("mneme");
console.log(mneme); //=> Hello from mneme!
Browser
<script type="module">
import { mneme } from "https://cdn.jsdelivr.net/npm/mneme/dist/esm/index.js";
console.log(mneme); //=> Hello from mneme!
</script>
<script nomodule src="https://cdn.jsdelivr.net/npm/mneme"></script>
<script nomodule>
console.log(mneme); //=> Hello from mneme!
</script>