Liking cljdoc? Tell your friends :D

dots.typescript.server.empty-array


concatcljs

(concat & items)

Combines two or more arrays.

Parameters:

  • items: (T | ConcatArray<T>)[] - Additional items to add to the end of array1.

Returns: T[]

Combines two or more arrays.

**Parameters:**
- `items`: `(T | ConcatArray<T>)[]` - Additional items to add to the end of array1.

**Returns:** `T[]`
sourceraw docstring

every?cljs

(every? predicate)
(every? predicate this-arg)

Determines whether all the members of an array satisfy the specified test.

Parameters:

  • predicate: (value: T, index: number, array: readonly T[]) => unknown - A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
  • this-arg: any - An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Returns: boolean

Determines whether all the members of an array satisfy the specified test.

**Parameters:**
- `predicate`: `(value: T, index: number, array: readonly T[]) => unknown` - A function that accepts up to three arguments. The every method calls
the predicate function for each element in the array until the predicate returns a value
which is coercible to the Boolean value false, or until the end of the array.
- `this-arg`: `any` - An object to which the this keyword can refer in the predicate function.
If thisArg is omitted, undefined is used as the this value.

**Returns:** `boolean`
sourceraw docstring

filtercljs

(filter predicate)
(filter predicate this-arg)

Returns the elements of an array that meet the condition specified in a callback function.

Parameters:

  • predicate: (value: T, index: number, array: readonly T[]) => unknown - A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
  • this-arg: any - An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Returns: T[]

Returns the elements of an array that meet the condition specified in a callback function.

**Parameters:**
- `predicate`: `(value: T, index: number, array: readonly T[]) => unknown` - A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
- `this-arg`: `any` - An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

**Returns:** `T[]`
sourceraw docstring

for-eachcljs

(for-each callbackfn)
(for-each callbackfn this-arg)

Performs the specified action for each element in an array.

Parameters:

  • callbackfn: (value: T, index: number, array: readonly T[]) => void - A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
  • this-arg: any - An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: void

Performs the specified action for each element in an array.

**Parameters:**
- `callbackfn`: `(value: T, index: number, array: readonly T[]) => void` - A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- `this-arg`: `any` - An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

**Returns:** `void`
sourceraw docstring

index-ofcljs

(index-of search-element)
(index-of search-element from-index)

Returns the index of the first occurrence of a value in an array.

Parameters:

  • search-element: T - The value to locate in the array.
  • from-index: number | undefined - The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

Returns: number

Returns the index of the first occurrence of a value in an array.

**Parameters:**
- `search-element`: `T` - The value to locate in the array.
- `from-index`: `number | undefined` - The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

**Returns:** `number`
sourceraw docstring

joincljs

(join)
(join separator)

Adds all the elements of an array separated by the specified separator string.

Parameters:

  • separator: string | undefined - A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

Returns: string

Adds all the elements of an array separated by the specified separator string.

**Parameters:**
- `separator`: `string | undefined` - A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

**Returns:** `string`
sourceraw docstring

last-index-ofcljs

(last-index-of search-element)
(last-index-of search-element from-index)

Returns the index of the last occurrence of a specified value in an array.

Parameters:

  • search-element: T - The value to locate in the array.
  • from-index: number | undefined - The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.

Returns: number

Returns the index of the last occurrence of a specified value in an array.

**Parameters:**
- `search-element`: `T` - The value to locate in the array.
- `from-index`: `number | undefined` - The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.

**Returns:** `number`
sourceraw docstring

lengthcljs

(length)

Gets the length of the array. This is a number one higher than the highest element defined in an array.

Returns: number

Gets the length of the array. This is a number one higher than the highest element defined in an array.

**Returns:** `number`
sourceraw docstring

mapcljs

(map callbackfn)
(map callbackfn this-arg)

Calls a defined callback function on each element of an array, and returns an array that contains the results.

Parameters:

  • callbackfn: (value: T, index: number, array: readonly T[]) => U - A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
  • this-arg: any - An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: U[]

Calls a defined callback function on each element of an array, and returns an array that contains the results.

**Parameters:**
- `callbackfn`: `(value: T, index: number, array: readonly T[]) => U` - A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- `this-arg`: `any` - An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

**Returns:** `U[]`
sourceraw docstring

reducecljs

(reduce callbackfn)
(reduce callbackfn initial-value)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters:

  • callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U - A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
  • initial-value: U - If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns: U

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

**Parameters:**
- `callbackfn`: `(previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U` - A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- `initial-value`: `U` - If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

**Returns:** `U`
sourceraw docstring

reduce-rightcljs

(reduce-right callbackfn)
(reduce-right callbackfn initial-value)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters:

  • callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U - A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
  • initial-value: U - If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns: U

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

**Parameters:**
- `callbackfn`: `(previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U` - A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- `initial-value`: `U` - If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

**Returns:** `U`
sourceraw docstring

set-sorted-array-brand!cljs

(set-sorted-array-brand! value)
source

slicecljs

(slice)
(slice start)
(slice start end)

Returns a section of an array.

Parameters:

  • start: number | undefined - The beginning of the specified portion of the array.
  • end: number | undefined - The end of the specified portion of the array. This is exclusive of the element at the index 'end'.

Returns: T[]

Returns a section of an array.

**Parameters:**
- `start`: `number | undefined` - The beginning of the specified portion of the array.
- `end`: `number | undefined` - The end of the specified portion of the array. This is exclusive of the element at the index 'end'.

**Returns:** `T[]`
sourceraw docstring

some?cljs

(some? predicate)
(some? predicate this-arg)

Determines whether the specified callback function returns true for any element of an array.

Parameters:

  • predicate: (value: T, index: number, array: readonly T[]) => unknown - A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
  • this-arg: any - An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Returns: boolean

Determines whether the specified callback function returns true for any element of an array.

**Parameters:**
- `predicate`: `(value: T, index: number, array: readonly T[]) => unknown` - A function that accepts up to three arguments. The some method calls
the predicate function for each element in the array until the predicate returns a value
which is coercible to the Boolean value true, or until the end of the array.
- `this-arg`: `any` - An object to which the this keyword can refer in the predicate function.
If thisArg is omitted, undefined is used as the this value.

**Returns:** `boolean`
sourceraw docstring

sorted-array-brandcljs

(sorted-array-brand)

Returns: any

**Returns:** `any`
sourceraw docstring

to-locale-stringcljs

(to-locale-string)

Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.

Returns: string

Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.

**Returns:** `string`
sourceraw docstring

to-stringcljs

(to-string)

Returns a string representation of an array.

Returns: string

Returns a string representation of an array.

**Returns:** `string`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close