Elgg  Version 2.3
Functions
prototypes.js File Reference

Go to the source code of this file.

Functions

 if (!Array.prototype.every)
 Interates through each element of an array and calls a callback function. More...
 
 if (!String.prototype.ltrim)
 Left trim. More...
 

Function Documentation

if ( !Array.prototype.  forEach)

Interates through each element of an array and calls a callback function.

Interates through each element of an array and calls callback a function.

The callback should accept the following arguments: element - The current element index - The current index

This is different to Array.forEach in that if the callback returns false, the loop returns immediately without processing the remaining elements.

Parameters
{Function}callback
Returns
{Bool}

The callback should accept the following arguments: element - The current element index - The current index

This is different to Array.every in that the callback's return value is ignored and every element of the array will be parsed.

Parameters
{Function}callback
Returns
{Void}

Definition at line 13 of file prototypes.js.

if ( !String.prototype.  ltrim)

Left trim.

Removes a character from the left side of a string.

Parameters
{String}str The character to remove
Returns
{String}

Definition at line 58 of file prototypes.js.