Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const lower

lower: (value: A) => Result<A, B> = lowercase

Type declaration

    • Parameters

      • value: A

      Returns Result<A, B>

Const upper

upper: (value: A) => Result<A, B> = uppercase

Type declaration

    • Parameters

      • value: A

      Returns Result<A, B>

Functions

Const isString

  • isString<A>(a: A): Either<Failure<A>, string>
  • isString tests if a value is a string.

    Type parameters

    • A

    Parameters

    • a: A

    Returns Either<Failure<A>, string>

Const lowercase

  • lowercase(value: string): Either<Failure<string>, string>
  • lowercase transforms a string into lowercase

    Parameters

    • value: string

    Returns Either<Failure<string>, string>

Const matches

  • matches tests if the value satisfies a regular expression.

    Parameters

    • pattern: RegExp

    Returns Precondition<string, string>

Const maxLength

Const minLength

Const notEmpty

  • notEmpty(value: string): Either<Failure<string>, string>
  • ne tests whether a string is empty or not.

    Parameters

    • value: string

    Returns Either<Failure<string>, string>

Const range

  • range(min: number, max: number): Precondition<string, string>
  • range tests whether the length of string falls within a range.

    Parameters

    • min: number
    • max: number

    Returns Precondition<string, string>

Const split

Const toString

  • toString<A>(a: A): Either<Failure<A>, string>
  • toString casts a value into a string.

    Type parameters

    • A

    Parameters

    • a: A

    Returns Either<Failure<A>, string>

Const trim

  • trim(value: string): Either<Failure<string>, string>
  • trim the whitespace from a string.

    Parameters

    • value: string

    Returns Either<Failure<string>, string>

Const uppercase

  • uppercase(value: string): Either<Failure<string>, string>
  • uppercase transforms a string into uppercase

    Parameters

    • value: string

    Returns Either<Failure<string>, string>

Legend

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

Generated using TypeDoc