@isopodlabs/utilities 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/regex.d.ts +0 -103
- package/dist/regex.js +0 -1044
- package/dist/regexp.d.ts +0 -90
- package/dist/regexp.js +0 -659
- package/dist/utils.d.ts +0 -28
- package/dist/utils.js +0 -98
package/package.json
CHANGED
package/dist/regex.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { SparseBits } from "./bits";
|
|
2
|
-
export declare class characterClass extends SparseBits {
|
|
3
|
-
type: 'class';
|
|
4
|
-
test(char: string): boolean;
|
|
5
|
-
mutable(): MutablecharacterClass;
|
|
6
|
-
isNegated(): boolean;
|
|
7
|
-
toString(): string;
|
|
8
|
-
}
|
|
9
|
-
declare class MutablecharacterClass extends characterClass {
|
|
10
|
-
setChar(char: string): void;
|
|
11
|
-
setString(c: string): this;
|
|
12
|
-
clearString(c: string): this;
|
|
13
|
-
}
|
|
14
|
-
export declare function range(from: string, to: string): MutablecharacterClass;
|
|
15
|
-
export declare function chars(chars: string): MutablecharacterClass;
|
|
16
|
-
export declare function union(...classes: characterClass[]): MutablecharacterClass;
|
|
17
|
-
export declare const any: characterClass;
|
|
18
|
-
export declare const digit: characterClass;
|
|
19
|
-
export declare const lower: characterClass;
|
|
20
|
-
export declare const upper: characterClass;
|
|
21
|
-
export declare const alpha: characterClass;
|
|
22
|
-
export declare const alnum: characterClass;
|
|
23
|
-
export declare const word: characterClass;
|
|
24
|
-
export declare const whitespace: characterClass;
|
|
25
|
-
export declare const hex: characterClass;
|
|
26
|
-
export declare const octal: characterClass;
|
|
27
|
-
export declare function text(c: string): string;
|
|
28
|
-
export declare function concatenation(parts: part[]): part[] | part;
|
|
29
|
-
interface alternation {
|
|
30
|
-
type: 'alt';
|
|
31
|
-
parts: part[];
|
|
32
|
-
}
|
|
33
|
-
export declare function alternation(parts: part[]): alternation | part;
|
|
34
|
-
type noncaptureOptions = 'ahead' | 'behind' | 'neg_ahead' | 'neg_behind' | 'atomic' | {
|
|
35
|
-
i?: boolean;
|
|
36
|
-
m?: boolean;
|
|
37
|
-
s?: boolean;
|
|
38
|
-
};
|
|
39
|
-
interface noncapture {
|
|
40
|
-
type: 'noncapture';
|
|
41
|
-
part: part;
|
|
42
|
-
options?: noncaptureOptions;
|
|
43
|
-
}
|
|
44
|
-
export declare function noncapture(part: part, options?: noncaptureOptions): noncapture;
|
|
45
|
-
export declare function lookAhead(part: part): noncapture;
|
|
46
|
-
export declare function negLookAhead(part: part): noncapture;
|
|
47
|
-
export declare function lookBehind(part: part): noncapture;
|
|
48
|
-
export declare function negLookBehind(part: part): noncapture;
|
|
49
|
-
interface capture {
|
|
50
|
-
type: 'capture';
|
|
51
|
-
name?: string;
|
|
52
|
-
part: part;
|
|
53
|
-
}
|
|
54
|
-
export declare function capture(part: part, name?: string): capture;
|
|
55
|
-
type quantifiedMod = 'greedy' | 'lazy' | 'possessive';
|
|
56
|
-
interface quantified {
|
|
57
|
-
type: 'quantified';
|
|
58
|
-
part: part;
|
|
59
|
-
min: number;
|
|
60
|
-
max: number;
|
|
61
|
-
mod: quantifiedMod;
|
|
62
|
-
}
|
|
63
|
-
export declare function repeatFrom(part: part, min: number, max?: number, mod?: quantifiedMod): quantified;
|
|
64
|
-
export declare function repeat(part: part, n: number, mod?: quantifiedMod): quantified;
|
|
65
|
-
export declare function zeroOrMore(part: part, mod?: quantifiedMod): quantified;
|
|
66
|
-
export declare function oneOrMore(part: part, mod?: quantifiedMod): quantified;
|
|
67
|
-
export declare function optional(part: part, mod?: quantifiedMod): quantified;
|
|
68
|
-
interface boundary {
|
|
69
|
-
type: 'wordbound' | 'nowordbound' | 'inputboundstart' | 'inputboundend';
|
|
70
|
-
}
|
|
71
|
-
export declare function boundary(type: boundary['type']): boundary;
|
|
72
|
-
export declare const wordBoundary: boundary;
|
|
73
|
-
export declare const nonWordBoundary: boundary;
|
|
74
|
-
export declare const startAnchor: boundary;
|
|
75
|
-
export declare const endAnchor: boundary;
|
|
76
|
-
interface reference {
|
|
77
|
-
type: 'reference';
|
|
78
|
-
value: number | string;
|
|
79
|
-
}
|
|
80
|
-
export declare function reference(value: number | string): reference;
|
|
81
|
-
export declare function anchored(part: part): part;
|
|
82
|
-
interface unicode {
|
|
83
|
-
type: 'unicode' | 'notunicode';
|
|
84
|
-
property: string;
|
|
85
|
-
}
|
|
86
|
-
type _part = alternation | noncapture | capture | characterClass | unicode | quantified | boundary | reference;
|
|
87
|
-
type part = string | part[] | _part;
|
|
88
|
-
export declare function parse(re: string, unicode?: boolean, extended?: boolean): part;
|
|
89
|
-
export declare function toRegExpString(part: part): string;
|
|
90
|
-
export declare function toRegExp(part: part, flags?: string): RegExp;
|
|
91
|
-
export declare function optimize(part: part): part;
|
|
92
|
-
interface DFAState {
|
|
93
|
-
nfaStates: Set<number>;
|
|
94
|
-
transitions: Map<string, DFAState>;
|
|
95
|
-
isAccepting: boolean;
|
|
96
|
-
}
|
|
97
|
-
export declare function runDFA(dfa: DFAState, str: string): boolean;
|
|
98
|
-
export declare function regexToDFA(part: part): DFAState;
|
|
99
|
-
export declare function parseGlob(glob: string): string;
|
|
100
|
-
export declare function anchoredRe(re: string): RegExp;
|
|
101
|
-
export declare function globToRe(glob: string): RegExp;
|
|
102
|
-
export declare function globToReMulti(globs: string[]): RegExp;
|
|
103
|
-
export {};
|