Installing Minitz


Node.js

npm install minitz --save

JavaScript

// ESM Import ...
import minitz from "minitz";

// ... or CommonJS Require
const minitz = require("minitz");

TypeScript

Note that only default export is available in Node.js TypeScript, as the commonjs module is used internally.

import minitz from "minitz";

// ...

Deno

JavaScript

import minitz from "https://deno.land/x/minitz@4.0.4/src/minitz.js";

// ...

TypeScript

import { minitz } from "https://deno.land/x/minitz@4.0.4/src/minitz.js";

// ...

Check https://deno.land/x/minitz for latest available version

Bun

bun add minitz

Note If you experience problems during install, try using bun add minitz --backend=copyfile.

JavaScript

import minitz from "minitz";

Browser

Manual

  • Download the latest zipball
  • Extract
  • Grab minitz.min.js (UMD and standalone) or minitz.min.mjs (ES-module) from the dist/ folder

CDN

To use as an UMD-module (stand alone, RequireJS etc.)

<script src="https://cdn.jsdelivr.net/npm/minitz/dist/minitz.min.js"></script>

To use as an ES-module

<script type="module">
	import minitz from "https://cdn.jsdelivr.net/npm/minitz/dist/minitz.min.mjs";

	// ... see usage section ...
</script>