small-module-js

1.0.2 • Public • Published

small-module-js

Easy to use and small module script for in-browser usage.

Installation

npm install --save small-module-js

Usage

Module('App.Test', (function () {
    // Set variables for the scope:
    var container = document.querySelector('div#container');

    function handleClick(event) {
        console.log(event);
    }

    function registerEvent() {
        container.addEventListener('click', handleClick);
    }

    // Do everything for initialization:
    function initialize() {
        registerEvent();
    }

    return {
        initialize: initialize,
    };
}));

License

It's MIT.

Readme

Keywords

Package Sidebar

Install

npm i small-module-js

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

6.29 kB

Total Files

5

Last publish

Collaborators

  • gameplayjdk