Installation

JOII can be used in a browser or as a NodeJS module.

Browser

Download the latest release of JOII on the github page and load it like any other JavaScript library. No further actions are needed.

<script type="text/javascript" src="/path/to/joii.min.js"></script>

JOII is compatible with all browsers starting from Internet Explorer 5.5 and does not require any dependencies.

Node

var JOII = require("joii");

var MyClass = JOII.Class({ /* ... */ });

Since version 4, JOII no longer exposes itself to the global scope by default. If you wish to enable the function Class, Interface and Enum to the global scope, use the useGlobal() function when requiring JOII.

require("joii").useGlobal();

var MyClass = Class({ /* ... */ });

Note that this isn't needed when running in a browser.

Development & Testing

Clone the repository from the github page.

Make sure npm and node are installed.

Install dependencies and run the testsuite (configurable in testsuite.js)

~ npm install
~ npm test

Use testsuite.html for browser testing. Both NodeJS and the browser testsuite use the same configuration for testing.