Learn

Installation

How to install Eta for use in Node.js or the browser

Eta tries to follow best practices, and provides a UMD build to support most JS loading options, like ES modules, CommonJS, and AMD.

Install Eta

npm install eta --save

Or if you prefer Yarn:

yarn add eta

Importing / Requiring

Eta is packaged as a UMD module, so you can require with CommonJS, import using ES Modules, or use AMD.

import * as Eta from "eta"
// or
var Eta = require("eta")
import * as eta from "https://deno.land/x/eta@v1.6.0/mod.ts"

Note: replace 1.6.0 with the current version

Unpkg

<script src="https://unpkg.com/eta"></script>

JSDelivr

<script src="https://cdn.jsdelivr.net/npm/eta"></script>

This makes Eta available through the global eta variable, and importable using ES modules, CommonJS, and AMD.