Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 582 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 582 Bytes

Namespace JS

Library for create namespaces in javascript.

Installation

npm i anayarojo-namespace-js

Usage

import namespace from 'anayarojo-namespace-js';

// Create a simple namespace
namespace('App.Module.Section');

// Create multiple namespaces
namespace('App.Module.SectionA', 'App.Module.SectionB', 'App.Module.SectionC');

// Create multiple namespaces with an array as parameter
namespace(['App.Module.SectionA', 'App.Module.SectionB', 'App.Module.SectionC']);

App.Module.Section = (function() {
    // ... functions here ...
});