Options
All
  • Public
  • Public/Protected
  • All
Menu

External module utils

Index

Functions

Const compose

  • compose<A, B, C>(f: function, g: function): (Anonymous function)
  • compose :: (b -> c) -> (a -> b) -> c

    Read as "f" after "g"

    Type parameters

    • A

      The first function argument taken.

    • B

      The result type of function g and argument for function f

    • C

      The result type of function f

    Parameters

    • f: function
        • (b: B): C
        • Parameters

          • b: B

          Returns C

    • g: function
        • (a: A): B
        • Parameters

          • a: A

          Returns B

    Returns (Anonymous function)

    A function that takes A and returns C by applying output of g to f

    Function composition. f after g. g andThen f

Const curry

  • curry<A, B, C>(f: function): (Anonymous function)
  • TODO

    Type parameters

    • A

    • B

    • C

    Parameters

    • f: function
        • (a: A, b: B): C
        • Parameters

          • a: A
          • b: B

          Returns C

    Returns (Anonymous function)

Const flip

  • flip<A, B, C>(f: function): (Anonymous function)
  • flip :: (a -> b -> c) -> (b -> a -> c)

    Type parameters

    • A

    • B

    • C

    Parameters

    • f: function
        • (a: A, b: B): C
        • Parameters

          • a: A
          • b: B

          Returns C

    Returns (Anonymous function)

Const fromAandBToC

  • fromAandBToC<A, B, C>(f: function): (Anonymous function)
  • Type parameters

    • A

    • B

    • C

    Parameters

    • f: function
        • (ab: [A, B]): function
        • Parameters

          • ab: [A, B]

          Returns function

            • (a: A): C
            • Parameters

              • a: A

              Returns C

    Returns (Anonymous function)

get

  • get<K>(prop: K): getter

Const identity

  • identity<T>(value: T): T
  • identity :: a -> a

    Type parameters

    • T

      The type of value taken and returned.

    Parameters

    • value: T

      The value to return

    Returns T

    The same value that was passed as the argument.

    Identify function

Const isNotNull

  • isNotNull<T>(value: T | null): boolean
  • isNotNull :: a | null -> a asserted

    Filter nullable types from an array

    Type parameters

    • T

    Parameters

    • value: T | null

      The nullable value to be checked

    Returns boolean

Const once

  • once<A, B>(f: function): (Anonymous function)
  • once :: (a -> b) -> (a -> b)

    Type parameters

    • A

      The funtions argument type.

    • B

    Parameters

    • f: function

      The function

        • (a: A): B
        • Parameters

          • a: A

          Returns B

    Returns (Anonymous function)

    A version of function f that will only run once.

set

  • set<K>(prop: K): setter

Const take

  • take(amount: number): (Anonymous function)
  • take :: number -> [a] -> [a]

    Take a number of elements from a list.

    Parameters

    • amount: number

      The number of elements to take.

    Returns (Anonymous function)

Generated using TypeDoc