UNPKG

ranges-set

Version:

Set operations on human-friendly ranges.

27 lines (26 loc) 1.68 kB
export type Repr = Literal | Range; export type Literal = {}; export type Range = {}; export declare function _compare(reprA: Repr, reprB: Repr): number; export declare function _createLiteral(text: string): Repr; export declare function _createRange(min: number, max: number): Repr; export declare function difference(textA: string, textB: string): string; export declare function _differenceReprs(reprsA: Repr[], reprsB: Repr[]): Repr[]; export declare function equal(textA: string, textB: string): boolean; export declare function _equalReprs(reprsA: Repr[], reprsB: Repr[]): boolean; export declare function expand(text: string): string[]; export declare function _expandReprs(reprs: Repr[]): string[]; export declare function intersection(textA: string, textB: string): string; export declare function _intersectionRepr(reprA: Repr, reprB: Repr): Repr | null; export declare function _intersectionReprs(reprsA: Repr[], reprsB: Repr[]): Repr[]; export declare function normalize(text: string): string; export declare function _parse(text: string): Repr[]; export declare function _parseOne(text: string): Repr; export declare function _serialize(reprs: Repr[]): string; export declare function _serializeOne(repr: Repr): string; export declare function subset(textA: string, textB: string): boolean; export declare function _subsetReprs(reprsA: Repr[], reprsB: Repr[]): boolean; export declare function union(textA: string, textB: string): string; export declare function _unionRepr(reprA: Repr, reprB: Repr): boolean; export declare function _unionReprs(reprs: Repr[], repr: Repr): void; export declare function _unionReprsAt(reprs: Repr[], repr: Repr, index: number): boolean;