Foundations

Foundations is a loadable framework of utility JavaScript APIs that both Mojo and JavaScript service applications can use.

Component Description
Array Utilities Array operation calls. Right now, just one for clearing an array.
Assert Utilities Assert operation calls. Two versions are provided for each call: one that logs an error and one that throws an error.
Communication Utilities Wrappers for async Ajax calls and a Palm bus service call.
Control Utilities Utilities to implement asynchronous callbacks (Futures), finite state machines, and map reduce functionality.
Environment Utilities Run-time environment (runtime, browser, node) detection calls.
Object Utilities Object operation calls. Right now, just one for converting an object containing name/value pairs to a string.
String Utilities String operation calls -- converting, escaping, searching, and stripping (HTML).
Structure Utilities Wrapper for allocating error and class objects.

Using Foundations

To include Foundations in your Mojo app code:

To include Foundations in your service app code: