Uint8ClampedArray

open external class Uint8ClampedArray<B : ArrayBufferLike>(val buffer: B, val byteOffset: Int = definedExternally, val length: Int = definedExternally) : TypedArray<Uint8ClampedArray<B>, Uint8ClampedArray<ArrayBuffer>, B, Byte> (source)

Constructors

Link copied to clipboard
constructor()
constructor(length: Int)
constructor(elements: JsIterable<Byte>)
constructor(elements: ReadonlyArray<Byte>)
constructor(buffer: B, byteOffset: Int = definedExternally, length: Int = definedExternally)

Types

Properties

Link copied to clipboard
open override val buffer: B
Link copied to clipboard
open override val byteLength: Int
Link copied to clipboard
open override val byteOffset: Int
Link copied to clipboard

The size in bytes of each element in the array.

Link copied to clipboard
open override val length: Int

Functions

Link copied to clipboard
fun <T> ArrayLike<T>.asList(): List<T>
Link copied to clipboard
fun at(index: Int): Byte?

Returns the item located at the specified index.

Link copied to clipboard
fun copyWithin(target: Int, start: Int, end: Int = definedExternally): Uint8ClampedArray<B>

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Link copied to clipboard
open override fun entries(): JsIterator<JsTuple2<Int, Byte>>
Link copied to clipboard
fun every(predicate: (value: Byte) -> Unit): Boolean

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

Link copied to clipboard
fun fill(value: Byte, start: Int = definedExternally, end: Int = definedExternally): Uint8ClampedArray<B>

Changes all array elements from start to end index to a static value and returns the modified array

Link copied to clipboard
fun filter(predicate: (value: Byte) -> Boolean): Uint8ClampedArray<ArrayBuffer>

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

Link copied to clipboard
fun find(predicate: (value: Byte) -> Boolean): Byte?

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

Link copied to clipboard
fun findIndex(predicate: (value: Byte) -> Boolean): Int

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

Link copied to clipboard
fun findLast(predicate: (value: Byte) -> Boolean): Byte?

Returns the value of the last element in the array where predicate is true, and undefined otherwise.

Link copied to clipboard
fun findLastIndex(predicate: (value: Byte) -> Boolean): Int

Returns the index of the last element in the array where predicate is true, and -1 otherwise.

Link copied to clipboard
open override fun forEach(action: (item: Byte) -> Unit)

Performs the specified action for each element in an array.

Link copied to clipboard
open operator fun get(index: Int): Byte
open operator fun get(key: Symbol.iterator): () -> JsIterator<Byte>
Link copied to clipboard
fun includes(searchElement: Byte, fromIndex: Int = definedExternally): Boolean

Determines whether an array includes a certain element, returning true or false as appropriate.

Link copied to clipboard
fun indexOf(searchElement: Byte, fromIndex: Int = definedExternally): Int

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

Link copied to clipboard
open inline operator fun iterator(): Iterator<Byte>
Link copied to clipboard
fun join(separator: String = definedExternally): String

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

Link copied to clipboard
open override fun keys(): JsIterator<Int>
Link copied to clipboard
fun lastIndexOf(searchElement: Byte, fromIndex: Int = definedExternally): Int

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

Link copied to clipboard
fun map(transform: (value: Byte) -> Byte): Uint8ClampedArray<ArrayBuffer>

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

Link copied to clipboard

Reverses the elements in an Array.

Link copied to clipboard
open operator fun set(index: Int, value: Byte)
fun set(array: Uint8ClampedArray<B>, offset: Int = definedExternally)
fun set(array: ReadonlyArray<Byte>, offset: Int = definedExternally)
Link copied to clipboard
fun slice(start: Int = definedExternally, end: Int = definedExternally): Uint8ClampedArray<ArrayBuffer>

Returns a section of an array.

Link copied to clipboard
fun some(predicate: (value: Byte) -> Boolean): Boolean

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

Link copied to clipboard
fun sort(comparison: (a: Byte, b: Byte) -> Int = definedExternally): Uint8ClampedArray<B>

Sorts an array.

Link copied to clipboard
fun subarray(start: Int, end: Int): Uint8ClampedArray<B>
Link copied to clipboard

Converts a number to a string by using the current locale.

Link copied to clipboard

Copies the array and returns the copy with the elements in reverse order.

Link copied to clipboard
fun toSorted(comparison: (a: Byte, b: Byte) -> Int = definedExternally): Uint8ClampedArray<ArrayBuffer>

Copies and sorts the array.

Link copied to clipboard

Returns the primitive value of the specified object.

Link copied to clipboard
open override fun values(): JsIterator<Byte>
Link copied to clipboard
fun with(index: Int, value: Byte): Uint8ClampedArray<ArrayBuffer>

Copies the array and inserts the given number at the provided index.