human-regex
Advanced tools
+9
-1
| { | ||
| "name": "human-regex", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "description": "Human-friendly regex builder with English-like syntax", | ||
@@ -50,3 +50,11 @@ "main": "dist/human-regex.cjs.js", | ||
| "tslib": "^2.8.1" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/rajibola/human-regex.git" | ||
| }, | ||
| "funding": { | ||
| "type": "github", | ||
| "url": "https://github.com/sponsors/rajibola" | ||
| } | ||
| } |
| /** | ||
| * Regex flags (optimized as Set-based) | ||
| */ | ||
| declare const Flags: { | ||
| readonly GLOBAL: "g"; | ||
| readonly NON_SENSITIVE: "i"; | ||
| readonly MULTILINE: "m"; | ||
| readonly DOT_ALL: "s"; | ||
| readonly UNICODE: "u"; | ||
| readonly STICKY: "y"; | ||
| }; | ||
| /** | ||
| * Precomputed character ranges | ||
| */ | ||
| declare const Ranges: Readonly<{ | ||
| digit: "0-9"; | ||
| lowercaseLetter: "a-z"; | ||
| uppercaseLetter: "A-Z"; | ||
| letter: "a-zA-Z"; | ||
| alphanumeric: "a-zA-Z0-9"; | ||
| anyCharacter: "."; | ||
| }>; | ||
| type RangeKeys = keyof typeof Ranges; | ||
| /** | ||
| * Quantifier symbols | ||
| */ | ||
| declare const Quantifiers: Readonly<{ | ||
| zeroOrMore: "*"; | ||
| oneOrMore: "+"; | ||
| optional: "?"; | ||
| }>; | ||
| declare class HumanRegex { | ||
| private parts; | ||
| private flags; | ||
| constructor(); | ||
| digit(): this; | ||
| special(): this; | ||
| word(): this; | ||
| whitespace(): this; | ||
| literal(text: string): this; | ||
| or(): this; | ||
| range(name: RangeKeys): this; | ||
| letter(): this; | ||
| exactly(n: number): this; | ||
| atLeast(n: number): this; | ||
| atMost(n: number): this; | ||
| between(min: number, max: number): this; | ||
| oneOrMore(): this; | ||
| optional(): this; | ||
| zeroOrMore(): this; | ||
| startGroup(): this; | ||
| endGroup(): this; | ||
| startAnchor(): this; | ||
| endAnchor(): this; | ||
| global(): this; | ||
| nonSensitive(): this; | ||
| protocol(): this; | ||
| www(): this; | ||
| tld(): this; | ||
| path(): this; | ||
| private add; | ||
| toString(): string; | ||
| toRegExp(): RegExp; | ||
| } | ||
| /** | ||
| * Memoized predefined patterns | ||
| */ | ||
| declare const createRegex: () => HumanRegex; | ||
| declare const Patterns: { | ||
| email: () => RegExp; | ||
| url: () => RegExp; | ||
| phoneInternational: () => RegExp; | ||
| }; | ||
| export { createRegex, Patterns, Flags, Ranges, Quantifiers }; |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
0
-100%44197
-3.2%8
-11.11%117
-38.74%