Skip to content

Commit

Permalink
feat: expose raw options on EmulatedRegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored and slevithan committed Jan 1, 2025
1 parent aa5e33b commit 85c91e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/subclass.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ results from `toDetails` to produce the same result as `toRegExp`.
*/
class EmulatedRegExp extends RegExpSubclass {
#strategy;
rawOptions;
/**
@param {string | EmulatedRegExp} pattern
@param {string} [flags]
Expand All @@ -36,6 +37,7 @@ class EmulatedRegExp extends RegExpSubclass {
// Can read private properties of the existing object since it was created by this class
this.#strategy = pattern.#strategy;
}
this.rawOptions = options;
}
/**
Called internally by all String/RegExp methods that use regexes.
Expand Down

0 comments on commit 85c91e7

Please sign in to comment.