Habitat

Habitat is a collection of JavaScript tools and libraries that I have built up for my personal use over the last 10 years.

How to use it

You can embed it, like this:

<script src="habitat-embed.js"></script>

Or import it like this:

import Habitat from "./habitat-import.js"

How to install it

Before you use it, you need to run the install function (which takes your global object as an argument):

Habitat.install(window)

Alternatively, you can choose to install specific parts of the library. This just installs the console features:

Habitat.Console.install(window)

Or, you can import specific global functions:

import {print} from "./habitat-import.js"

There are more examples of how to use Habitat in the examples folder.