Namespace: Utils

Marbles. Utils

Source:

Methods

(static) assertEqual(obj, otherObj) → {bool}

compare two objects of any type
Parameters:
Name Type Description
obj *
otherObj *
Source:
Returns:
Type
bool

(static) createClass(proto) → {Class}

Creates a constructor with given prototype
Parameters:
Name Type Description
proto Object
Source:
Returns:
ctor
Type
Class
Example
Utils.createClass({
	displayName: "MyClass", // ctor.displayName

	// Array of objects to mix-into prototype
	mixins: [
		Marbles.State
	],

	parentClass: MyOtherClass, // inherit from MyOtherClass (optional)

	willInitialize: function () {}, // called before parent ctor is called

	didInitialize: function () {}, // called after parent ctor is called

	myProperty: 123 // no special meaning
});

(static) extend(obj, …other)

Parameters:
Name Type Attributes Description
obj Object The object to extend
other Object <repeatable>
One or more objects to extend it with
Source: