import { Function1 } from 'fp-ts/lib/function'; import { Option } from 'fp-ts/lib/Option'; /** * 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. */ export declare const match: (re: RegExp) => (x: string) => Option; /** * Lookup a value from an es6 map, providing the result as an Option type. */ export declare const lookup: (m: Map, key: T) => Option; /** * Split a string into a tuple containing the parts to the left and right of * the first occurance of a seperator. */ export declare const splitOn: (seperator: string) => (a: string) => Option<[string, string]>; /** * Split and trim a string into a [key, val] tuple. */ export declare const toKeyVal: (seperator: string) => (a: string) => Option<[string, string]>; /** * Parse a string containing a set of key/value pairs into a Map. */ export declare const stringToMap: (propDelimiter: string | RegExp, keyValDelimiter: string) => (x: string) => Map; /** * Wrapper for querying value from within a Map and parsing them on the way out. */ export declare const parseFromMap: (parser: Function1) => (propMap: Map) => (key: T, fallback: V) => V;