Package-level declarations

Types

Link copied to clipboard
sealed external class Buffer : Uint8Array<ArrayBufferLike>
Link copied to clipboard
sealed external interface BufferConstants
Link copied to clipboard
sealed external interface BufferEncoding
Link copied to clipboard
sealed external interface BufferToJSONResult
Link copied to clipboard
sealed external interface TranscodeEncoding
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
external var File: Any

File class is a global reference for require('node:buffer').File https://nodejs.org/api/buffer.html#class-file

Link copied to clipboard
Link copied to clipboard
external val kMaxLength: Double
Link copied to clipboard
external val kStringMaxLength: Double

Functions

Link copied to clipboard
external fun isAscii(input: ArrayBuffer): Boolean
external fun isAscii(input: TypedArray<*, *, *, *>): Boolean
external fun isAscii(input: Buffer): Boolean

This function returns true if input contains only valid ASCII-encoded data, including the case in which input is empty.

Link copied to clipboard
external fun isUtf8(input: ArrayBuffer): Boolean
external fun isUtf8(input: TypedArray<*, *, *, *>): Boolean
external fun isUtf8(input: Buffer): Boolean

This function returns true if input contains only valid UTF-8-encoded data, including the case in which input is empty.

Link copied to clipboard
external fun resolveObjectURL(id: String): Blob?

Resolves a 'blob:nodedata:...' an associated Blob object registered using a prior call to URL.createObjectURL().

Link copied to clipboard
external fun transcode(source: Uint8Array<*>, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer

Re-encodes the given Buffer or Uint8Array instance from one character encoding to another. Returns a new Buffer instance.