(input: unknown): input is Uint8ArrayChecks whether a value is a Uint8Array.
When to use
Use when you need a Predicate runtime guard for binary data.
Details
Uses instanceof Uint8Array.
Example (Guarding Uint8Array values)
import { Predicate } from "effect"
const data: unknown = new Uint8Array([1, 2])
console.log(Predicate.isUint8Array(data))Source effect/Predicate.ts:12293 lines
export function function isUint8Array(
input: unknown
): input is Uint8Array
Checks whether a value is a Uint8Array.
When to use
Use when you need a Predicate runtime guard for binary data.
Details
Uses instanceof Uint8Array.
Example (Guarding Uint8Array values)
import { Predicate } from "effect"
const data: unknown = new Uint8Array([1, 2])
console.log(Predicate.isUint8Array(data))
isUint8Array(input: unknowninput: unknown): input: unknowninput is interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
requested number of bytes could not be allocated an exception is raised.
Uint8Array {
return input: unknowninput instanceof var Uint8Array: Uint8ArrayConstructorA typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
requested number of bytes could not be allocated an exception is raised.
Uint8Array
}