A collection of JS modules to meet basic needs for web clients.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tissevert aff304bd40 Improve guix declaration 7 months ago
src/UnitJS Generalize support for events in Dom element maker 11 months ago
.gitignore The output of the compilation shouldn't be versioned 4 years ago
CHANGELOG.md Add a guix package declaration 10 months ago
Makefile Make a SJW package out of UnitJS 3 years ago
README.md Add a guix package declaration 10 months ago
guix.scm Improve guix declaration 7 months ago
unit.js.tpl Add a guix package declaration 10 months ago



UnitJS is a tiny Javascript framework to write web applications. It provides four essential modules to deal with asynchronous functions (technically, it's a monad obtained by currifying the CPS functions of Javascript like setTimeout), value caching, DOM manipulation and basic functional needs like composition or object projections.

How to use it in your project

As a SJW package.

With guix

The easiest way to use it in your web projects is to simply package them with guix.


You can follow these instructions to use it without guix.

Without SJW

If you don't want to or can't use SJW, it's still possible to use UnitJS by generating a single script that can then be loaded from your web page like this :

<script src="/path/to/unit.js"></script>

The file unit.js can be easily generated with make, which actually just calls the unit.js.tpl script. Note that you can still generate custom «partial» versions of unit.js if you don't use all of it by overriding the SRC variable of the Makefile like so :

make SRC="src/UnitJS/Dom.js src/UnitJS/Cache.js"

or by manually calling ./unit.js.tpl with the files you want, like the Makefile does.

When used that way, the UnitJS library will be available to your Javascript code as a global variable unitJS containing each of the modules (Async, Dom, etc.) as an attribute.