(options: RegexChunkerOptions)
| 60 | private readonly strictBoundaries: boolean |
| 61 | |
| 62 | constructor(options: RegexChunkerOptions) { |
| 63 | const resolved = resolveChunkerOptions(options) |
| 64 | this.chunkSize = resolved.chunkSize |
| 65 | this.chunkOverlap = resolved.chunkOverlap |
| 66 | this.regex = this.compilePattern(options.pattern) |
| 67 | this.strictBoundaries = options.strictBoundaries ?? false |
| 68 | } |
| 69 | |
| 70 | private compilePattern(pattern: string): RegExp { |
| 71 | if (!pattern) { |
nothing calls this directly
no test coverage detected