Liking cljdoc? Tell your friends :D

dots.typescript.node-array


concatcljs

(concat node-array & 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

endcljs

(end node-array)

Returns: number

**Returns:** `number`
sourceraw docstring

every?cljs

(every? node-array predicate)
(every? node-array 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 node-array predicate)
(filter node-array 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 node-array callbackfn)
(for-each node-array 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

has-trailing-comma?cljs

(has-trailing-comma? node-array)

Returns: boolean

**Returns:** `boolean`
sourceraw docstring

index-ofcljs

(index-of node-array search-element)
(index-of node-array 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 node-array)
(join node-array 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 node-array search-element)
(last-index-of node-array 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 node-array)

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 node-array callbackfn)
(map node-array 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

poscljs

(pos node-array)

Returns: number

**Returns:** `number`
sourceraw docstring

reducecljs

(reduce node-array callbackfn)
(reduce node-array 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 node-array callbackfn)
(reduce-right node-array 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

slicecljs

(slice node-array)
(slice node-array start)
(slice node-array 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? node-array predicate)
(some? node-array 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

to-locale-stringcljs

(to-locale-string node-array)

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 node-array)

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