API Docs for: 1.3.12
Show:

EcArray Class

Array Helper Functions

Item Index

Methods

Methods

has

(
  • a
  • o
)
static

Returns true if the array has the value already.

Parameters:

  • a Array

    Array.

  • o Object

    Object to sample for.

indexOf

(
  • a
  • o
)
static

Returns the index of an object or value if the object or value exists in the array. Uses .equals if available.

Parameters:

  • a Array

    Array to check over.

  • o Any

    Object to check for.

Returns:

Index of the result, -1 if the result isn't in the array.

isArray

(
  • o
)
static

Returns true if the result is an array.

Parameters:

  • o Any

    Object to test.

Returns:

true iff the object is an array.

isObject

(
  • o
)
static

Returns true if the result is an object.

Parameters:

  • o Any

    Object to test.

Returns:

true iff the object is an object.

removeDuplicates

(
  • a
)
static

Removes values IFF the values == one another.

Parameters:

  • a Array

    Array to remove duplicates from.

setAdd

(
  • a
  • o
)
static

Adds a value if the array does not have the value already.

Parameters:

  • a Array

    Array to add to.

  • o Object

    Object to add to the array if it isn't in there already.

setAdd

(
  • a
  • o
)
static

Removes a value from the array.

Parameters:

  • a Array

    Array to add to.

  • o Object

    Object to add to the array if it isn't in there already.