Static addStatic containsChecks if an array contains a certain value or an object contains a certain key. It is possible to specify multiple values.
An array (values are checked) or an object (keys are checked)
Rest ...values: any[]One or more values to check
True if the array contains one of the values or the object has a key that matches one of the values.
Static createStatic createCreates an array filled with a sequence of integer numbers.
Number of numbers to fill with
Starting number (default 0)
Stepping size (default 1)
Optional array: number[]Array to use, when missing create a new array.
created array or the value of anArray filled with sequence of integer numbers
Static findFinds an item in the array that matched all properties in the aMatch object.
This method uses the UF.tools.UFObject.equalProperties to compare properties.
Array to look trough
An object with one or more properties that must be matched.
When true with string types ignore casing when comparing, false casing should match
index of entry or -1 if none was found
Static getStatic randomStatic removeStatic removeStatic removeStatic replaceStatic replaceStatic replaceReplaces multiple search values with a new value. If a value from aSearchValues is found, it is replaced with the value from aNewValues. For each value in aSearchValues, aNewValues must contain a matching new value (in other words aNewValues contains the same number of elements as aSearchValues).
anArray value
Static shuffleRandomly swaps elements in array, shuffling the contents of the array.
Array to shuffle
Optional iterations: numberNumber of times to perform swap. If the value is not set, it will be set to 1.5 * length of the array.
value of anArray
Static sortStatic sumStatic swapStatic toStatic to
Defines a static class UFArray, a utility library with static methods for Array instances.