@natoboram/based.ts
    Preparing search index...

    Class Based

    Base-encoded string. Use this class if you convert from and to different bases often. Otherwise, just use the provided utilities. You can provide a custom number's space

    Index

    Constructors

    • Parameters

      • value: string
      • base: bigint
      • Optionalspace: string

      Returns Based

    Properties

    base: bigint
    space: string
    value: string

    Methods

    • Divide this Based by another Based.

      Parameters

      Returns Based

    • Subtract another Based from this Based.

      Parameters

      Returns Based

    • Multiply this Based by another Based.

      Parameters

      Returns Based

    • Add another Based to this Based.

      Parameters

      Returns Based

    • Convert this Based to a different base.

      Parameters

      • base: bigint
      • Optionalspace: string

      Returns Based

    • Convert this Based to a JSON object.

      Returns { base: string; space: string; value: string }

    • Convert this Based to a JSON string.

      Returns string

    • Convert this Based to a UTF-8 string.

      Returns string

    • Convert this Based to a UUID.

      Returns `${string}-${string}-${string}-${string}-${string}`

    • Create a Based from a UTF-8 string.

      Parameters

      • value: string
      • Optionalbase: bigint
      • Optionalspace: string

      Returns Based

    • Create a Based from a UUID.

      Parameters

      • uuid: `${string}-${string}-${string}-${string}-${string}`
      • Optionalbase: bigint
      • Optionalspace: string

      Returns Based