Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as bytes.es from "https://raw.githubusercontent.com/i-xi-dev/bytes.es/4.4.2/deps.ts";

§Namespaces

ArrayBufferViewConstructor
Base64

Provides Base64 decoding and Base64 encoding methods.

Base64.Options
BigUint64
BufferUtils
BytesFormat
BytesStream
DataURL
Digest
Http
Isomorphic

Isomorphic encoding

Loading
MediaType
Percent
Percent.Options
SafeInteger
SafeInteger.FromOptions
StringEx
Uint8

§Classes

Base64.Decoder

Base64 decoder

Base64.DecoderStream

The TransformStream that decodes a stream of Base64-encoded string into Uint8Array stream.

Base64.Encoder

Base64 encoder

Base64.EncoderStream

The TransformStream that encodes a stream of Uint8Array into Base64-encoded string stream.

BytesSize
BytesStream.ReadingTask

The byte stream reading task.

DataURL.Resource
InvalidStateError

The InvalidStateError represents an error when an object is in an invalid state.

Loading.Task abstract

The loading task.

MediaType

The object representation of MIME type. The MediaType instances are immutable.

Percent.Decoder

Percent decoder

Percent.Encoder

Percent encoder

§Variables

_Blob

If the globalThis has a Blob, or if the node:buffer package has a Blob, then the Blob constructor. Otherwise referencing it will throw a ReferenceError.

_crypto

If the globalThis has a crypto, or if the node:crypto package has a webcrypto, then the Crypto object. Otherwise referencing it will throw a ReferenceError.

_File

If the globalThis has a File, or if the node:buffer package has a File, then the File constructor. Otherwise referencing it will throw a ReferenceError.

_ProgressEvent

If the globalThis has a ProgressEvent, then the ProgressEvent constructor. Otherwise the polyfill of ProgressEvent constructor.

Base64.Options.RFC4648

The options for RFC 4648 Base64.

Base64.Options.RFC4648URL

The options for RFC 4648 Base64url.

BigUint64.BYTES
BigUint64.MAX_VALUE

The maximum value of 64-bit unsigned integer.

BigUint64.MIN_VALUE

The minimum value of 64-bit unsigned integer.

BigUint64.SIZE

The number of bits used to represent an 64-bit unsigned integer.

BufferUtils.BYTE_ORDER
ByteOrder
Digest.Md5 deprecated

MD5 digest algorithm

Digest.Sha1 deprecated

SHA-1 digest algorithm

Digest.Sha256

SHA-256 digest algorithm

Digest.Sha384

SHA-384 digest algorithm

Digest.Sha512

SHA-512 digest algorithm

Http.Header

The header field name.

Http.Method

The request method name.

Loading.Status

The loading status.

Percent.Options.C0

The options for the C0 controls percent-encode

Percent.Options.FORM_URLENCODED

The options for the application/x-www-form-urlencoded percent-encode

Percent.Options.URI_COMPONENT

The options for the URL component percent-encode

Percent.Options.URI_FRAGMENT

The options for the URL fragment percent-encode

Percent.Options.URI_PATH

The options for the URL path percent-encode

Percent.Options.URI_QUERY

The options for the URL query percent-encode

Percent.Options.URI_SPECIAL_QUERY

The options for the URL special-query percent-encode

Percent.Options.URI_USERINFO

The options for the URL userinfo percent-encode

StringEx.EMPTY

The zero-length string.

Uint8.BYTES
Uint8.MAX_VALUE

The maximum value of 8-bit unsigned integer.

Uint8.MIN_VALUE

The minimum value of 8-bit unsigned integer.

Uint8.SIZE

The number of bits used to represent an 8-bit unsigned integer.

§Functions

ArrayBufferViewConstructor.isArrayBufferViewConstructor
ArrayBufferViewConstructor.isDataViewConstructor
ArrayBufferViewConstructor.isTypedArrayConstructor
Base64.decode

Decodes a Base64-encoded string into an Uint8Array.

Base64.encode

Encodes the specified byte sequence into a string.

BigUint64.isBigUint64

Determines whether the passed test is a 64-bit unsigned integer.

BufferUtils.bytesAEqualsBytesB
BufferUtils.bytesAStartsWithBytesB
BufferUtils.fromAsyncBigUint64Iterable
BufferUtils.fromAsyncUint16Iterable
BufferUtils.fromAsyncUint32Iterable
BufferUtils.fromAsyncUint8Iterable
BufferUtils.fromBigUint64Iterable
BufferUtils.fromUint16Iterable
BufferUtils.fromUint32Iterable
BufferUtils.fromUint8Iterable
BufferUtils.isArrayOfUint8 deprecated
BufferUtils.isBigEndian
BufferUtils.isLittleEndian
BufferUtils.toBigUint64Iterable
BufferUtils.toUint16Iterable
BufferUtils.toUint32Iterable
BufferUtils.toUint8Iterable
BytesFormat.format
BytesFormat.parse
Isomorphic.decode

Implements isomorphic decode defined in WHATWG Infra Standard.

Isomorphic.encode

Implements isomorphic encode defined in WHATWG Infra Standard.

Percent.decode

Decodes a Percent-encoded string into an Uint8Array.

Percent.encode

Encodes the specified byte sequence into a string.

SafeInteger.fromBigInt
SafeInteger.fromNumber
SafeInteger.FromOptions.resolve
SafeInteger.fromString
SafeInteger.isEvenSafeInteger
SafeInteger.isNegativeSafeInteger
SafeInteger.isNonNegativeSafeInteger

Determines whether the test is a non-negative safe integer.

SafeInteger.isNonPositiveSafeInteger
SafeInteger.isOddSafeInteger
SafeInteger.isPositiveSafeInteger

Determines whether the test is a positive safe integer.

SafeInteger.roundToSafeInteger
SafeInteger.toBigInt
SafeInteger.toString
StringEx.collectStart
StringEx.contains
StringEx.endsWith
StringEx.isNonEmptyString
StringEx.isString
StringEx.matches
StringEx.segment
StringEx.startsWith
StringEx.trim
StringEx.trimEnd
StringEx.trimStart
Uint8.fromBigInt
Uint8.fromNumber
Uint8.fromString
Uint8.isUint8

Determines whether the passed test is an 8-bit unsigned integer.

Uint8.rotateLeft
Uint8.saturateFromSafeInteger
Uint8.toBigInt
Uint8.toString
Uint8.truncateFromSafeInteger

§Interfaces

Digest.Algorithm

Digest algorithm

§Type Aliases

ArrayBufferViewConstructor

The type of the ArrayBufferView constructor.

ArrayBufferViewConstructor.TypedArrayConstructor

The type of the TypedArray constructor.

Base64.Options

The object with the following optional fields. The defaults are the values that conforms to the RFC 4648 Base64 specification.

BigUint64

The type of 64-bit unsigned integer.

ByteOrder
BytesFormat.Options

The object with the following optional fields.

BytesStream.Source

The ReadableStream of Uint8Array or the async iterator of Uint8Array.

Loading.Options

The loading options.

Loading.Status
MediaType.CompareOptions

The MediaType equivalent comparison option.

MediaType.Parameter

The string tuple represents a MIME type parameter.

Percent.Options

The object with the following optional fields.

SafeInteger
SafeInteger.FromOptions
SafeInteger.FromOptions.Resolved
Uint8

The type of 8-bit unsigned integer.

Uint8.FromOptions