Dom and General Javascript Utilities, used in house at Exposure Digital

Usage no npm install needed!

<script type="module">
  import exposureUtils from 'https://cdn.skypack.dev/exposure-utils';


Dom and Javascript Utilites

A lightweight, modern javascript utility node module, for simplifying some basic functions and providing a cross browser dom manipulation API.

This library is by no means perfect, extensive or complete. So if you think of a feature/spot a bug, pull request that shit!


    // Might need to install with Admin privileges (sudo).
    npm install exposure-utils


Require the package and immediately invoke it to have access to the API.

    var utils = require('exposure-utils')();

Equally you can instantiate it with the new keyword. Here's an example.

    var Utils = require('exposure-utils');
    var $ = new Utils();
    var array = ['item 1', 'item 2', 'item 3'];
    $.each(array, function(item, index) {
        console.log(item, index);
    Output -
    item 1, 0
    item 2, 1
    item 3, 2

Browser Support

IE 9+


API docs here, API Reference