Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

All

  • Type parameters

    • T

    Parameters

    Returns boolean

Any

  • Type parameters

    • T

    Parameters

    Returns boolean

CapitalizeSentences

  • CapitalizeSentences(sentences: string): string
  • Parameters

    • sentences: string

    Returns string

CapitalizeWords

  • CapitalizeWords(str: string): string
  • Parameters

    • str: string

    Returns string

CharactersCount

  • CharactersCount(str: string, ...characters: string[]): number
  • Parameters

    • str: string
    • Rest ...characters: string[]

    Returns number

CloneArray

  • CloneArray<T>(array: T[]): T[]
  • Simple clone array

    since

    2.0.2

    version

    2020-01-11

    Type parameters

    • T

    Parameters

    • array: T[]

    Returns T[]

ContainsSubstringOnlyOnce

  • ContainsSubstringOnlyOnce(str: string, ...substrings: string[]): boolean
  • Parameters

    • str: string
    • Rest ...substrings: string[]

    Returns boolean

Distinct

  • Distinct<T>(val: string | T[]): string | T[]
  • Type parameters

    • T

    Parameters

    • val: string | T[]

    Returns string | T[]

FileSize

  • FileSize(bytes: number, baseOn1024?: boolean): string
  • Humanize bytes

    since

    3.0.0

    version

    2021-08-07

    Parameters

    • bytes: number
    • baseOn1024: boolean = false

      default false

    Returns string

First

  • First<T>(array: T[]): undefined | T
  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns undefined | T

FormatString

  • FormatString(format: string, ...args: (string | number)[]): string
  • Parameters

    • format: string
    • Rest ...args: (string | number)[]

    Returns string

GetBaseLog

  • GetBaseLog(num: number, baseNumber: number): number
  • Parameters

    • num: number
    • baseNumber: number

    Returns number

GetIndent

  • GetIndent(str: string): string
  • Parameters

    • str: string

    Returns string

GetLeadingNumber

  • GetLeadingNumber(str: string, float?: boolean): string
  • since

    3.0.0

    version

    2021-08-07

    Parameters

    • str: string
    • float: boolean = false

    Returns string

GetSubstring

  • Parameters

    Returns string

IsEmpty

  • IsEmpty<T>(val: string | T[] | undefined): boolean
  • since

    3.0.4

    version

    2021-12-07

    Type parameters

    • T

    Parameters

    • val: string | T[] | undefined

    Returns boolean

IsEqual

  • IsEqual(a?: string, b?: string, ignoreCase?: boolean): boolean
  • since

    2.0.13

    version

    2021-03-18

    Parameters

    • Optional a: string
    • Optional b: string
    • ignoreCase: boolean = true

    Returns boolean

IsNotEmpty

  • IsNotEmpty<T>(val: string | T[] | undefined): boolean
  • since

    3.0.4

    version

    2021-12-07

    Type parameters

    • T

    Parameters

    • val: string | T[] | undefined

    Returns boolean

IsString

  • IsString(val: any): boolean
  • Parameters

    • val: any

    Returns boolean

Last

  • Last<T>(array: T[]): undefined | T
  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns undefined | T

LeftRotate

  • LeftRotate(num: number, n: number, bits?: number): number
  • Parameters

    • num: number
    • n: number
    • Optional bits: number

    Returns number

Mod

  • Mod(num: number, n: number): number
  • Parameters

    • num: number
    • n: number

    Returns number

OnlyContains

  • OnlyContains(str: string, ...characters: string[]): boolean
  • Parameters

    • str: string
    • Rest ...characters: string[]

    Returns boolean

ParseFileSize

  • ParseFileSize(fileSize: string): number | undefined
  • since

    3.0.0

    version

    2021-08-07

    Parameters

    • fileSize: string

    Returns number | undefined

Remove

  • Remove<T>(array: T[], index: number): any[]
  • Type parameters

    • T

    Parameters

    • array: T[]
    • index: number

    Returns any[]

ReplaceAll

  • ReplaceAll(str: string, old: string, rep: string): string
  • Parameters

    • str: string
    • old: string
    • rep: string

    Returns string

ReplaceAt

  • ReplaceAt(str: string, index: number, rep: string, length?: number): string
  • Parameters

    • str: string
    • index: number
    • rep: string
    • length: number = 1

    Returns string

ReplaceAtPos

  • Parameters

    Returns string

Reverse

  • Reverse(str: string): string
  • Parameters

    • str: string

    Returns string

RightRotate

  • RightRotate(num: number, n: number, bits?: number): number
  • Parameters

    • num: number
    • n: number
    • Optional bits: number

    Returns number

SequenceEqual

  • SequenceEqual<T>(array: T[], second: T[]): boolean
  • Type parameters

    • T

    Parameters

    • array: T[]
    • second: T[]

    Returns boolean

Split

  • Split<T>(array: T[], size: number, fromLeft?: boolean): T[][]
  • Type parameters

    • T

    Parameters

    • array: T[]
    • size: number
    • Optional fromLeft: boolean

    Returns T[][]

SplitByN

  • SplitByN(str: string, n: number, fromLeft?: boolean): string[]
  • Parameters

    • str: string
    • n: number
    • Optional fromLeft: boolean

    Returns string[]

Swap32

  • Swap32(n: number): number
  • Parameters

    • n: number

    Returns number

ToArray

  • ToArray(str: string): string[]
  • Parameters

    • str: string

    Returns string[]

ToDays

  • ToDays(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToHEX

  • ToHEX(...array: number[]): string
  • Parameters

    • Rest ...array: number[]

    Returns string

ToHours

  • ToHours(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToMilliseconds

  • ToMilliseconds(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToMinutes

  • ToMinutes(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToMonths

  • ToMonths(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToSeconds

  • ToSeconds(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToUInt32

  • ToUInt32(n: number): number
  • Parameters

    • n: number

    Returns number

ToUTF8ByteArray

  • ToUTF8ByteArray(str: string): number[]
  • Parameters

    • str: string

    Returns number[]

ToWeeks

  • ToWeeks(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

ToYears

  • ToYears(num: number, currentUnit: TimeUnit): number
  • Parameters

    Returns number

TrimAll

  • TrimAll(str: string, trimString: string): string
  • TrimAll(str: string, trimString: string, max: number): string
  • TrimAll(str: string, trimStrings: string[]): string
  • since

    3.0.3

    version

    2021-12-06

    Parameters

    • str: string
    • trimString: string

    Returns string

  • Parameters

    • str: string
    • trimString: string
    • max: number

    Returns string

  • Parameters

    • str: string
    • trimStrings: string[]

    Returns string

TrimEnd

  • TrimEnd(str: string, trimString: string): string
  • TrimEnd(str: string, trimString: string, max: number): string
  • TrimEnd(str: string, trimStrings: string[]): string
  • TrimEnd(str: string, trimStrings: string[], trimAll: boolean): string
  • since

    3.0.3

    version

    2021-12-06

    Parameters

    • str: string
    • trimString: string

    Returns string

  • Parameters

    • str: string
    • trimString: string
    • max: number

    Returns string

  • Parameters

    • str: string
    • trimStrings: string[]

    Returns string

  • Parameters

    • str: string
    • trimStrings: string[]
    • trimAll: boolean

    Returns string

TrimStart

  • TrimStart(str: string, trimString: string): string
  • TrimStart(str: string, trimString: string, max: number): string
  • TrimStart(str: string, trimStrings: string[]): string
  • TrimStart(str: string, trimStrings: string[], trimAll: boolean): string
  • since

    3.0.3

    version

    2021-12-06

    Parameters

    • str: string
    • trimString: string

    Returns string

  • Parameters

    • str: string
    • trimString: string
    • max: number

    Returns string

  • Parameters

    • str: string
    • trimStrings: string[]

    Returns string

  • Parameters

    • str: string
    • trimStrings: string[]
    • trimAll: boolean

    Returns string

UTF8Encode

  • UTF8Encode(str: string): string
  • Parameters

    • str: string

    Returns string

padStart

  • padStart(str: string, targetLength: number, padString: string): string
  • Parameters

    • str: string
    • targetLength: number
    • padString: string

    Returns string

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Class
  • Class with type parameter
  • Enumeration

Generated using TypeDoc