oniguruma-to-js
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -18,18 +18,2 @@ interface ConstructOptions { | ||
interface OnigurumaToRegexpOptions extends Omit<ConstructOptions, 'original'> { | ||
} | ||
declare function onigurumaToRegexp(pattern: string, options?: OnigurumaToRegexpOptions): RegExp; | ||
declare class RegExpConversionError extends SyntaxError { | ||
patternOriginal: string; | ||
patternConverted?: string; | ||
cursorPosition?: number; | ||
constructor(message: string, options: { | ||
pattern: string; | ||
converted?: string; | ||
cursor?: number; | ||
cause?: unknown; | ||
}); | ||
} | ||
interface SyntaxLoweringOptions { | ||
@@ -44,2 +28,18 @@ /** | ||
preserveFlags?: boolean; | ||
/** | ||
* Remove possessive quantifiers like `*+`, `?+`, `++`, `{1,2}+`. | ||
* | ||
* This might alter the meaning of the regex. | ||
* | ||
* @default false | ||
*/ | ||
removePossessiveQuantifier?: boolean; | ||
/** | ||
* Remove atomic group like `(?>...)` to non-capturing group `(?:...)`. | ||
* | ||
* This might alter the meaning of the regex. | ||
* | ||
* @default false | ||
*/ | ||
removeAtomicGroup?: boolean; | ||
} | ||
@@ -55,2 +55,18 @@ interface SyntaxLoweringResult { | ||
interface OnigurumaToRegexpOptions extends Omit<ConstructOptions, 'original'>, SyntaxLoweringOptions { | ||
} | ||
declare function onigurumaToRegexp(pattern: string, options?: OnigurumaToRegexpOptions): RegExp; | ||
declare class RegExpConversionError extends SyntaxError { | ||
patternOriginal: string; | ||
patternConverted?: string; | ||
cursorPosition?: number; | ||
constructor(message: string, options: { | ||
pattern: string; | ||
converted?: string; | ||
cursor?: number; | ||
cause?: unknown; | ||
}); | ||
} | ||
export { type ConstructOptions, type OnigurumaToRegexpOptions, RegExpConversionError, type SyntaxLoweringOptions, type SyntaxLoweringResult, construct, onigurumaToRegexp, syntaxLowering }; |
{ | ||
"name": "oniguruma-to-js", | ||
"type": "module", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"packageManager": "pnpm@9.9.0", | ||
@@ -6,0 +6,0 @@ "description": "Covert Oniguruma-flavor Regexp to JavaScript native RegExp", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33331
745