项目作者: nimjetushar

项目描述 :
Creates namespace for JavaScript applications
高级语言: JavaScript
项目地址: git://github.com/nimjetushar/Namespace.js.git
创建时间: 2018-10-01T15:05:11Z
项目社区:https://github.com/nimjetushar/Namespace.js

开源协议:MIT License

下载


Namespace.js

Build Status


GitHub license

Creates namespace for JavaScript applications

  1. Namespace("app.test");
  2. app.test = {"name": "Hello"};
  3. Namespace("app.test.demo");

Change the seperator (default is ‘.’)

  1. Namespace.separator = '/' // seperator can be any character
  2. Namespace("app/test/demo")

Note: While creating namespace the nested member variable should always be object and any other member type (such as string, number, boolean, etc…) will result in error.