Class Utils

Constructors

Methods

  • Converts your string into a cipher

    Parameters

    • text: string

      Text you wish to cipher

    • key: number = 13

      Number of key

    Returns string

  • Parameters

    • text: string

      Text you wish to create a hash with

    • algorithm: string = "sha256"

      Default is sha256

    Returns string

  • Creates an id of string

    Parameters

    • length: number = 4

      Length of id

    Returns string

  • Returns your string with the first letter on each word uppercased

    Parameters

    • text: string

      string you want to change

    • split: string = " "

      default is " "

    Returns string

  • Formats bytes digits into multiple types of bytes (KB, MB, GB, TB...)

    Parameters

    • bytes: number

      Number of bytes(B)

    Returns string

  • Formats the unicode into easy to read interface

    Parameters

    • unicode: number

      Unicode digits

    Returns string

  • Formats a number into the currect digits

    Parameters

    • number: string

      Number you wish to format

    • minimumFractionDigits: number = 0

      Minimum fraction of digits to convert to (Default is 0)

    Returns string

  • Parameters

    • string: string

    Returns boolean

  • Converts an array into a string and lists out the values

    Parameters

    • array: string[]

      Array you wish to list

    • conjuction: string = "and"

      Default is "and"

    Returns string

  • Generates a random number

    Parameters

    • min: number = 1

      Minimum amount of number (Default is 1)

    • max: number = 100

      Maximum amount of number (Default is 100)

    Returns number

    random number

  • Removes duplicated strings in an array

    Parameters

    • array: string[]

      Array you wish to remove duplicates

    Returns string[]

    A new array with no duplicates

  • shortens a text given

    Parameters

    • text: string

      Text you wish to shorten

    • maxLen: number = 2000

      max length of text (Default is 2000)

    Returns string

  • shuffles an array given

    Parameters

    • array: string[]

      Array you wish to shuffle

    Returns string[]

  • sorts an array accordingly

    Parameters

    • array: string[]

      Array you wish to sort

    Returns string[]

Generated using TypeDoc