Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/parser"

Index

Functions

lookup

  • lookup<T, U>(m: Map<T, U>, key: T): None<U> | Some<U>
  • Lookup a value from an es6 map, providing the result as an Option type.

    Type parameters

    • T

    • U

    Parameters

    • m: Map<T, U>
    • key: T

    Returns None<U> | Some<U>

match

  • match(re: RegExp): (Anonymous function)
  • Given a regexp execute it on a string to search, returning the result as a Option type so we can keep some sanity and don't have to deal with nulls.

    Parameters

    • re: RegExp

    Returns (Anonymous function)

parseFromMap

  • parseFromMap<T, U, V>(parser: Function1<U, V>): (Anonymous function)
  • Wrapper for querying value from within a Map and parsing them on the way out.

    Type parameters

    • T

    • U

    • V

    Parameters

    Returns (Anonymous function)

splitOn

  • splitOn(seperator: string): function
  • Split a string into a tuple containing the parts to the left and right of the first occurance of a seperator.

    Parameters

    • seperator: string

    Returns function

      • (a: A): C
      • Parameters

        • a: A

        Returns C

stringToMap

  • stringToMap(propDelimiter: string | RegExp, keyValDelimiter: string): (Anonymous function)
  • Parse a string containing a set of key/value pairs into a Map.

    Parameters

    • propDelimiter: string | RegExp
    • keyValDelimiter: string

    Returns (Anonymous function)

toKeyVal

  • toKeyVal(seperator: string): function
  • Split and trim a string into a [key, val] tuple.

    Parameters

    • seperator: string

    Returns function

      • (a: A): C
      • Parameters

        • a: A

        Returns C

Generated using TypeDoc