Methods
-
within( range, unit, callback )
-
Description
Fire a callback when the value is within a certain rangeParameters
Name Type Description range
Array.<number> The upper and lower ends of the range to watch unit
string The property to test callback
function A callback to run when the event is fired. Details
-
on( event, listener )
-
Description
Create an event listenerParameters
Name Type Description event
string The name of the event to listen for listener
function A callback to run when the event is fired. Details
-
removeListener( event, listener )
-
Description
Remove an event listenerParameters
Name Type Description event
string The name of the event that we are removing a listener from listener
function The callback that we are removing Details
-
emit( event )
-
Description
Emit an eventParameters
Name Type Description event
string The name of the event to emit Details
-
once( event, listener )
-
Description
Create an event listener that will only fire one time.Parameters
Name Type Description event
string The name of the event to listen for listener
function A callback to run when the event is fired. Details