Url.ts
Url overview
Table of contents
arbitrary
arbitrary
FastCheck arbitrary for generating random Url instances.
Signature
export declare const arbitrary: Arbitrary<Url>Added in v2.0.0
encoding
toBytes
Encode Url to bytes.
Signature
export declare const toBytes: (url: Url) => anyAdded in v2.0.0
toHex
Encode Url to hex string.
Signature
export declare const toHex: (url: Url) => stringAdded in v2.0.0
model
Url (class)
Schema for Url representing URLs as branded text. url = text .size (0..128)
Signature
export declare class UrlAdded in v2.0.0
toJSON (method)
Convert to JSON representation.
Signature
toJSON()Added in v2.0.0
toString (method)
Convert to string representation.
Signature
toString(): stringAdded in v2.0.0
[Inspectable.NodeInspectSymbol] (method)
Custom inspect for Node.js REPL.
Signature
[Inspectable.NodeInspectSymbol](): unknownAdded in v2.0.0
[Equal.symbol] (method)
Structural equality check.
Signature
[Equal.symbol](that: unknown): booleanAdded in v2.0.0
[Hash.symbol] (method)
Hash code generation.
Signature
[Hash.symbol](): numberAdded in v2.0.0
parsing
fromBytes
Parse Url from bytes.
Signature
export declare const fromBytes: (bytes: Uint8Array) => UrlAdded in v2.0.0
fromHex
Parse Url from hex string.
Signature
export declare const fromHex: (hex: string) => UrlAdded in v2.0.0
predicates
isUrl
Check if the given value is a valid Url
Signature
export declare const isUrl: (u: unknown, overrideOptions?: ParseOptions | number) => u is UrlAdded in v2.0.0
utils
FromBytes
Signature
export declare const FromBytes: Schema.transform<
Schema.transform<
Schema.transform<typeof Schema.Uint8ArrayFromSelf, typeof Schema.String>,
Schema.refine<string, typeof Schema.String>
>,
typeof Url
>FromHex
Signature
export declare const FromHex: Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transform<
Schema.transform<
Schema.transform<typeof Schema.Uint8ArrayFromSelf, typeof Schema.String>,
Schema.refine<string, typeof Schema.String>
>,
typeof Url
>
>