0.1.8 • Published 8 years ago

lp-namespace v0.1.8

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

LP-Namespace

This module is used to create (ensure existence) namespaces inside Javascript objects. By namespace I mean something like MY.CUSTOM.NAMESPACE. Here, we the result in an object will be the following:

{
    MY: {
            CUSTOM: {
                NAMESPACE: {}
        }
    }
}

You can also use the ns.js file directly in browser which declares a global LP variable for you to use.

Install

NodeJS npm

npm install lp-namespace

Bower

bower install lp-namespace

Import the ns.js file in your website.

<script src="lp-namespace/dist/ns.min.js"></script>

The above script will create a global variable LP which contains the API of the module.

API

ns(namespace, container)

This method ensures that the @container object contains properties that represent the given @namespace.

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago