Helper

static Helper

Methods

boolean has( )

Determine if an object has a property (not on the prototype chain)

obj Object
key

Object defaults( )

Adds default properties to an object

obj

T extend( )

Adds or replaces properties on an object

obj

inherit( )

Does very basic inheritance for a class

Derived Function Class to do the inheriting
Base Function Base class

boolean isKeyDown( )

Returns if a given key is pressed

keyCode number Key code. Usually obtained from Keys
modifiers Object
modifiers.shift boolean If true, will check if shift was held at the time false
modifiers.ctrl boolean If true, will check if control was held at the time false
modifiers.alt boolean If true, will check if alt was held at the time false

boolean isObject( )

Determines if the argument is an object

obj

boolean isArray( )

Determines if the arguments in an array

obj

Array getKeysDown( )

Returns all of the keys currently pressed

sign( )

Returns 1 if x is positive
-1 if x is negative
0 if x is 0

x number