jsUtils

utils  0.2.4

jsUtils > utils > Utils.Namespaceable
Search:
 
Filters

static Class Utils.Namespaceable

Namespaceable is a mixin object which adds namespace abilities to any object.

Methods

namespace

Object namespace ( name , extensions )
Creates a namespace with the current object as it's root.
Utils.namespace("SomeNamespace", Utils.Namespaceable)  
SomeNamespace.namespace("Utils") 
This will create the namespace SomeNamespace.Utils
Parameters:
name <String> A dot separated namespace name eg. 'Utils.some.namespace'
extensions <Object*> An object containing attributes to be added to the namespace.
Returns: Object
the namespace object


Copyright © 2009 Gareth Andrew. All rights reserved.