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.1.10/deps.ts";

§Namespaces

Base64

Provides Base64 decoding and Base64 encoding methods.

Base64.Options
BufferUtils
BytesFormat
BytesStream
DataURL
Digest
Http
Isomorphic

Isomorphic encoding

Percent
Percent.Options
Reading
SafeInteger
Uint8

The 8-bit unsigned integer

§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.

MediaType

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

Percent.Decoder

Percent decoder

Percent.Encoder

Percent encoder

Reading.Task abstract

The reading task.

§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.

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.

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

Reading.Status

The reading status.

SafeInteger.RoundingMode
Uint8.MAX_VALUE

The maximum value of 8-bit unsigned integer.

Uint8.MIN_VALUE

The minimum value of 8-bit unsigned integer.

§Functions

Base64.decode

Decodes a Base64-encoded string into an Uint8Array.

Base64.encode

Encodes the specified byte sequence into a string.

BufferUtils.isArrayBufferViewConstructor
BufferUtils.isArrayOfUint8
BufferUtils.isDataViewConstructor
BufferUtils.isTypedArrayConstructor
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.fromString
SafeInteger.isEven
SafeInteger.isNonNegative

Determines whether the passed value is a non-negative safe integer.

SafeInteger.isOdd
SafeInteger.isPositive

Determines whether the passed value is a positive safe integer.

SafeInteger.round
SafeInteger.toBigInt
SafeInteger.toString
Uint8.fromBigInt
Uint8.fromNumber
Uint8.isUint8

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

§Interfaces

Digest.Algorithm

Digest algorithm

§Type Aliases

Base64.Options

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

BufferUtils.ArrayBufferViewConstructor

The type of the ArrayBufferView constructor.

BufferUtils.TypedArrayConstructor

The type of the TypedArray constructor.

BytesFormat.Options

The object with the following optional fields.

BytesFormat.Radix

2, 8, 10, or 16.

BytesStream.Source

The ReadableStream of Uint8Array or the async iterator of Uint8Array.

Percent.Options

The object with the following optional fields.

Reading.Options

The reading options.

Reading.Status
SafeInteger.FromOptions
SafeInteger.RoundingMode
Uint8.FromOptions