Prototype Extensions - Axiom

The following built-in JavaScript object types have been extended in Axiom. Below are the methods and properties added to each.


Contents

Array.contains()

Description

Array.contains(item)

Returns true if the item exists within the current Array.

Parameters

  • item (Anything) - Item to check.

Returns

(Boolean) - True if the item exists within the current Array.


Array.indexOf()

Description

Array.indexOf(item)

Returns the index within the Array of the item passed in. Returns -1 if the item is not in the Array.

Parameters

  • item (Anything) - Item to check.

Returns

(Number) - The index within the Array of the item passed in. Returns -1 if the item is not in the Array.


Array.intersection()

Description

Array.intersection(array1, array2, arrayN ...)

Returns the intersection of the Arrays passed in.

Parameters

  • array1 (Array) - First Array to intersect.
  • array2 (Array) - Second Array to intersect.
  • arrayN (Array, Optional) - Optional, Array to unite. Any number of additional Arrays can be passed in.

Returns

(Array) - The intersection of the Arrays passed in.

Notes

This is a static method, so it cannot be called on an instance of an Array. This method can accept two or more Arrays.


Array.lastIndexOf()

Description

Array.indexOf(item)

Returns the last index within the Array of the item passed in. Returns -1 if the item is not in the Array.

Parameters

  • item (Anything) - Item to check.

Returns

(Number) - The last index within the Array of the item passed in. Returns -1 if the item is not in the Array.


Array.union()

Description

Array.union(array1, array2, arrayN ...)

Returns the union of the Arrays passed in.

Parameters

  • array1 (Array) - First Array to unite.
  • array2 (Array) - Second Array to unite.
  • arrayN (Array, Optional) - Optional, Array to unite. Any number of additional Arrays can be passed in.

Returns

(Array) - The union of the Arrays passed in.

Notes

This is a static method, so it cannot be called on an instance of Array. This method can accept two or more Arrays.




Date.ONESECOND

Description

Date.ONESECOND

(Number) - Millisecond representation of one second.

Notes

This is a static property, so it cannot be called on an instance of Date.


Date.ONEMINUTE

Description

Date.ONEMINUTE

(Number) - Millisecond representation of one minute.

Notes

This is a static property, so it cannot be called on an instance of Date.


Date.ONEHOUR

Description

Date.ONEHOUR

(Number) - Millisecond representation of one hour.

Notes

This is a static property, so it cannot be called on an instance of Date.


Date.ONEDAY

Description

Date.ONEDAY

(Number) - Millisecond representation of one day.

Notes

This is a static property, so it cannot be called on an instance of Date.


Date.ONEWEEK

Description

Date.ONEWEEK

(Number) - Millisecond representation of one week.

Notes

This is a static property, so it cannot be called on an instance of Date.


Date.format()

Description

Date.format(format, locale, timezone)

Returns a string formatted as specified in the parameters.

Parameters

  • format (String) - A format pattern (as accepted by java.text.SimpleDateFormat).
  • locale (java.util.Locale, Optional) - Optional Locale.
  • timezone (java.util.TimeZone) - Optional TimeZone.

Returns

(String) - A string formatted as specified in the parameters.


Date.dateValue()

Description

Date.dateValue()

Returns the Lucene specific date value for the current Date Object.

Returns

(Number) - The Lucene specific date value for the current Date Object.


Date.timeValue()

Description

Date.timeValue()

Returns the Lucene specific time value for the current Date Object.

Returns

(Number) - The Lucene specific time value for the current Date Object.


Date.timestampValue()

Description

Date.timestampValue()

Returns the Lucene specific timestamp value for the current Date Object.

Returns

(Number) - The Lucene specific timestamp value for the current Date Object.



Number.smallIntValue()

Description

Number.smallIntValue()

Returns the Lucene specific smallInt value for the current Number Object.

Returns

(String) - The Lucene specific smallInt value for the current Number Object.


Number.smallFloatValue()

Description

Number.smallFloatValue()

Returns the Lucene specific smallFloat value for the current Number Object.

Returns

(String) - The Lucene specific smallFloat value for the current Number Object.




String.md5()

Description

String.md5()

Returns the MD5 hash of the current String Object.

Returns

(String) - The MD5 hash of the current String Object.