Skip to end of metadata
Go to start of metadata

util

 

Contains 'helper' functions useful for development.


Require Extended Library: 

 

 

Methods

Name Description 
util.debug

Prints the supplied message to the standard output.  Use the App Development web page for your phone to view the output from debugging. For debugging objects, use the JSON.stringify function.

util.defaults

Merges two objects and returns the result. For each key provided, the target object is checked for a corresponding key. If none is found, it will be created with the provided value. Keys in target that are defined will not be overwritten.

util.forceArray

Returns an array.

util.formatDuration

Takes a number of seconds and returns a formatted string representing that amount of time in hours and seconds. There are two possible formats: long and short.

util.isDef

Returns true if the supplied variable is defined, false if it is not defined (undefined).

util.isUndef

Returns true if the supplied variable is undefined, false if it is defined.

  • No labels