arrayAddToSet(items, set) |
Adds the items in an array to the set. |
arrayBinaryIndexOf(indexable, comparisonValueToSearchFor, getComparisonValueAtIndex, length, start) |
Performs a bisection search of an ‘indexable’ object, i.e. can be accessed by index, for example Array . Custom data structures are also supported. |
arrayBinaryLastIndexOf(indexable, comparisonValueToSearchFor, getComparisonValueAtIndex, length, start) |
Performs a bisection search of an ‘indexable’ object, i.e. can be accessed by index, for example Array . Custom data structures are also supported. |
arrayCollect(items, collected, collect) |
Like Array.reduce but without the requirement to return the value in the callback. |
arrayCompact(items) |
Strips null and undefined items from arrays (non mutative). |
arrayCompactMap(items, map) |
Like _Array.map but where the callback returns null it will be omitted from the result. |
arrayContains(items, item) |
Returns true if the item is present in the list (=== equality test). |
arrayContains(items, item) |
Returns true if the item is present in the list (=== equality test). |
arrayCopyInto(from, to, startIndex, length) |
Make an array contain the same items as another. |
arrayFlatMap(items, mapCallback) |
Iterate over ArrayLike calling a callback against it, the callback returns ArrayLike which is concatenated into a single Array . |
arrayForEach(items, callback) |
Like Array.forEach . |
arrayForEachRange(from, to, callback) |
Like arrayForEach() with integer range as input. |
arrayGenerateRange(from, to) |
Generates a range of integers output in an Array . |
arrayIndex(items, getKey) |
Populates a Map given a key creating function and ArrayLike . |
arrayInsertAtIndex(items, itemToInsert, insertAtIndex) |
Modifies input array by inserting at given index. |
arrayIntersect(a, b, getComparisonValue) |
Given two ArrayLike , provides the items common between them in an Array . |
arrayIsArray(obj) |
Checks if the parameter is an instance of Array or is a view of ArrayBuffer . |
arrayIsNotEmpty(items) |
Returns true if the argument is not null, undefined or empty. Type narrows to TArray where true. |
arrayLast(items) |
Gets the last value in ArrayLike . |
arrayMap(items, callback) |
Like Array.map . |
arrayMapRange(from, to, callback) |
Like arrayMap() with integer range as input. |
arrayMax(numbers) |
Find the largest number in an array, if the array is empty the return is -Infinity. |
arrayMin(numbers) |
Find the smallest number in an array, if the array is empty the return is Infinity. |
arrayNormalizeEmptyToUndefined(array) |
Replaces length 0 ArrayLike with undefined . |
arrayNormalizeNullishToEmpty(array) |
Replaces null / undefined with an empty Array . |
arrayPushUnique(items, itemToPush, getComparisonValue) |
Like Array.push but checks if the value is unique first. |
arrayRemoveMany(items, itemsToRemove) |
Removes each item in itemsToRemove from items (including any repeated items). |
arrayRemoveOne(items, itemToRemove) |
Removes either 0 or one item from items, even if itemToRemove appears more than once. |
arrayReplaceOne(items, itemToRemove, replaceWith) |
Replaces the first match of itemToRemove with replaceWith. |
arraySetDifference(a, b) |
returns items in A not in B. |
arraySymmetricDifference(a, b, aSet, bSet) |
Returns those items in A not in B, and those items in B not in A. |
arrayUnion(items, getComparisonValue) |
Given an ArrayLike of ArrayLike , provides all unique items in an Array . |
arrayUnique(items) |
Creates a new array with no duplicates, using standard object equality. |
dictionaryCloneExtend(base, extension) |
Creates an object which is extended sequentially by two additional objects. |
dictionaryExtend(base, extension) |
Modifies an object to include the keys and values of another. |
dictionaryForEach(dictionary, callback) |
Like Array.forEach but for arbitrary objects. |
dictionaryPairs(dictionary) |
converts objects into key value pair tuples. |
dictionaryPush(dict, key, value) |
Used with dictionary that store arrays. Where an array exists for a given key the value will be appended to that array, otherwise a new array will be created containing the value. |
dictionaryValues(d) |
Equivalent to Object.values. |
equalityAllEqual(items) |
Returns true if all items are triple equal === . |
equalityAreConsistentlyDefined(a, b) |
Returns true if both A and B are both null, undefined or ‘defined’. Defined is not null and not undefined. |
fpDebounce(wait, immediate, functionToProxy) |
Creates a function that will proxy calls to functionToProxy when wait time has passed since the last call, using the most recent arguments. Where immediate is true, the function immediately proxies the call and will not proxy again until wait time passes since the last call. |
fpIdentity(arg) |
Returns the argument. |
fpMaybeNewValue(newValue, oldValue) |
Returns the newValue if defined, else the old value. |
fpNoOp(_args) |
Does nothing (intentionally…). |
fpNormalizeToNull(value) |
Normalizes undefined input to null . |
fpNormalizeToUndefined(value) |
Normalizes null input to undefined . |
fpOnce(initialize) |
Creates a function that can be called many times but will run at most once. |
fpValueOrNull(predicate, value) |
Returns the value if the predicate is true, else null. |
getEmscriptenWrapper(memory, emscriptenModuleFactory, extension) |
Factory for creating wrapped emscripten module. |
iteratorConsumeAll(iterator) |
Iterate over an iterator until it’s done, discarding the results. |
mapAddToSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
mapAddToSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
mapArrayMap(map, callback) |
Like Array.map but with a Map input. Outputs an Array . |
mapClearingDeleteFromSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set, if it is empty after removal, then the set is deleted. |
mapClearingDeleteFromSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set. |
mapConcat(map, key, values) |
Used with maps that store arrays. Where an array exists for a given key the values will be appended to that array, otherwise a copy of values array will be inserted. |
mapConcat(map, key, values) |
Used with maps that store arrays. Where an array exists for a given key the values will be appended to that array, otherwise a copy of values array will be inserted. |
mapDeleteFromSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set. |
mapDeleteFromSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set. |
mapDeleteGet(map, key) |
Get the stored value if present, then delete the key. |
mapDeleteGet(map, key) |
Get the stored value if present, then delete the key. |
mapEntriesToArray(map) |
Converts a Map into an Array of its key value pairs. |
mapFirstKey(map) |
Gets the first inserted key in a Map . |
mapFirstValue(map) |
Gets the first inserted value in a Map . |
mapInitializeGet(map, key, getValue) |
Gets the value from a Map for a given key, where the value is undefined or hasn’t been set, the callback’s return will be inserted into the Map and returned. |
mapInitializeGet(map, key, getValue) |
Gets the value from a Map for a given key, where the value is undefined or hasn’t been set, the callback’s return will be inserted into the Map and returned. |
mapIntersect(a, b) |
<p>Does not check value equality, only key. Takes items from A.</p><p>See mapIntersect().</p> |
mapKeysToArray(map) |
Converts a Map into an Array of its keys. |
mapPush(map, key, value) |
Used with maps that store arrays. Where an array exists for a given key the value will be appended to that array, otherwise a new array will be created containing the value. |
mapPush(map, key, value) |
Used with maps that store arrays. Where an array exists for a given key the value will be appended to that array, otherwise a new array will be created containing the value. |
mapRemoveManyFromArray(map, key, itemsToRemove) |
Used with maps that store arrays. Where an array exists for a given key the values will be removed from that array. |
mapRemoveManyFromArray(map, key, itemsToRemove) |
Used with maps that store arrays. Where an array exists for a given key the values will be removed from that array. |
mapRemoveOneFromArray(map, key, value) |
Used with maps that store arrays. Where an array exists for a given key the value will be removed from that array. |
mapRemoveOneFromArray(map, key, value) |
Used with maps that store arrays. Where an array exists for a given key the value will be removed from that array. |
mapReportingAddToSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
mapReportingAddToSet(map, key, value) |
Used with maps that store sets. Where a set exists for a given key the value will be added to that set, otherwise a new set will be created containing the value. |
mapSetDifference(a, b) |
returns items in A not in B. |
mapSymmetricDifference(a, b) |
Returns a map with keys in A not in B, and keys in B not in A. |
mapUnion(a, b) |
Returns a map with keys from both A and B. If both A and B have the same key the value from B will be used. |
mapValuesToArray(map) |
Converts a Map into an Array of its values. |
mathBound(value, min, max) |
Bound a value in to a range. |
mathBoundRandom(min, max) |
Create a random value between min and max. |
mathHypot2(a, b) |
As per Math.hypot, expect with 2 args. |
mathMax(a, b) |
Returns the larger of the two parameters a and b . |
mathMin(a, b) |
Returns the smaller of the two parameters a and b . |
numberGetHexString(value) |
Returns the hex representation of the number. If it’s not a number it returns “NaN”. |
Once(target, key, descriptor) |
Method decorator. The target will be called only once, subsequent calls will return the first return. |
pathJoin(start, end, separator) |
Joins two strings start and end with a separator . |
promiseDelay(resolveWith, delay) |
Returns a Promise which will resolve to resolveWith after a delay of delay (in milliseconds). |
promiseRejectFalse(value, error) |
Returns a Promise of rejection with the supplied error if the value is false. |
promiseRejectFalsey(value, error) |
Returns a Promise of rejection with the supplied error if the value is falsy. |
promiseRejectNull(value, error) |
Returns a Promise of rejection with the supplied error if the value is null or undefined . |
regexEscapeRegex(value) |
Escapes RegExp special characters in strings. |
setDefaultUnitTestFlags() |
|
setIsSetEqual(a, b) |
Tests to see if all of the members of a set are the same. |
setSetDifference(a, b) |
returns items in A not in B. |
setSymmetricDifference(a, b) |
Returns those items in A not in B, and those items in B not in A. |
setValuesToArray(set) |
Converts a set into an array of its values. |
stringNormalizeEmptyToUndefined(input) |
Replaces length 0 strings with undefined . |
stringNormalizeNullUndefinedToEmpty(input) |
Replaces null / undefined with an empty string . |