decline-ts
Version:
Composable command-line parser for TypeScript - a (partial) porting of Scala decline using fp-ts
12 lines (11 loc) • 622 B
TypeScript
import { Option } from 'fp-ts/Option';
import { NonEmptyString } from './fp';
export declare namespace StringUtils {
const isEmpty: (str: string) => str is "";
const isNonEmpty: (str: string) => str is NonEmptyString;
const stripMargins: (str: string) => string;
function mkString(sep: string): (list: ReadonlyArray<string>) => string;
function mkString(start: string, sep: string, end: string): (list: ReadonlyArray<string>) => string;
const matcher1: (regex: RegExp) => (str: string) => Option<string>;
const matcher2: (regex: RegExp) => (str: string) => Option<readonly [string, string]>;
}