Convert em number to a plain number
Conver a number to em
Conver a number to px
Conver a number to rem
Conver a number to vh
Conver a number to vw
Convert px number to a plain number
Convert rem number to a plain number
Convert vh number to a plain number
Convert vw number to a plain number
Creates a function that turns 1unit
into 1
The regex to remove the unit e.g. /^([0-9\.]*?)px$/
Creates a function to add a unit to the number.
The unit to append.
Runs the supplied itterator for all elements in the array asyncronously.
The array to itterate through.
The async function to run for each element.
Runs Array.map asyncronously.
The array to map
The function to run for each
Repeat the given function number
times asyncronously
The number of times to itterate
The function to run
A crude caching system that will cache values for the given time.
The promise function that returns the cached value.
A crude caching system that will cache values for the given time.
The function that returns the cached value.
Cache the given value in the supplied key if the key doesn't already exist.
The key to store.
Does the supplied key exist in the cache?
Key to check.
Create a co-ordinate grid
The maximum X value.
The maximum Y value.
THe default value for all cells.
(Optional) The minimum X value, defaults to 0
(Optional) The minimum Y value, defaults to 0
Deeply applies defaults to an object.
The supplied options, a DeepPartial
of defaultValues
.
The default values to fallback on. Should represent a full copy of the options object.
Returns an object with 2 parameters. additional
which is elements in compare
that are not in original
, and missing
which are elements in original
that are not in compare
The base array to compare against
The array to compare to
Delete the supplied key from the cache.
Key to delete.
Takes an array of objects and returns an object with a property for each value in the key
containing an array of all the objects that have that value.
The key to group by.
The array of objects.
Returns an object indexed by the given field from the array of objects.
The key to index by.
The array of Objects.
See IndexedByOptions
Returns an array of keys that matches the type keyof T
Any object.
Takes an array of objects and returns an array of values from the given property
The array of objects
The property to extract
Adds
for new lines in a string
The multi line string to add
tags to
Takes a string and makes it safe for url slugs.
For Example: My Article's title
becomes my-articles-title
The string to parameterize
Find all entires in an array where prop
equals value
.
The Items to filter
The property to filter
The value to check for
Find all entires in an array where prop
does not equals value
.
The Items to filter
The property to filter
The value to check for
Returns an array of ranges
e.g. [[1,3], [5,6], [10,15], [20,20]]
An array of integers to describe
Returns an array of string describing the range.
e.g. ['1-3','5,6','10-15','20']
An array of integers to describe
Removes all keys from the cache.
Repeat the given function number
times
The number of times to itterate
The function to run
Returns the supplied value if it is not undefined otherwise it returns the or value.
The Value that could be undefined
The fallback value
Normalises a promise that errors into an awaitable [result, error] array.
The resolveable promise
Generated using TypeDoc
Works the same as
Partial<T>
except it appliesPartial
to sub elements.