Importing
In the browser:
<script type="module" src="myScript.js"></script>
// myScript.js
import { Moogle } from "https://unpkg.com/@drashland/moogle@1.0.0/lib/esm/Moogle.js";
const service = new Moogle();
In Node:
# Using npm
$ npm install @drashland/moogle
# Using yarn
$ yarn add @drashland/moogle
// JavaScript
const { Moogle } = require("@drashland/moogle");
const service = new Moogle();
// TypeScript
import { Moogle } from "@drashland/moogle";
const serviceWithTypes = new Moogle<MyType>();
const serviceWithoutTypes = new Moogle();
In Deno:
// JavaScript
import { Moogle } from "https://unpkg.com/@drashland/moogle@1.0.0/lib/esm/Moogle.js";
const service = new Moogle();
// TypeScript
import { Moogle } from "https://deno.land/x/moogle@v1.0.0/mod.ts";
const serviceWithTypes = new Moogle<MyType>();
const serviceWithoutTypes = new Moogle();
Updates
- v1 release