(match: string, p1: string, p2: string, p3: string, offset: number, string: string, groups: Record<string, string> | undefined)
| 1945 | it('replace function offset', () => { |
| 1946 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_a_parameter |
| 1947 | function replacer(match: string, p1: string, p2: string, p3: string, offset: number, string: string, groups: Record<string, string> | undefined) { |
| 1948 | // p1 is nondigits, p2 digits, and p3 non-alphanumerics |
| 1949 | return [match, p1, p2, p3, offset, string, groups].join(' - ') |
| 1950 | } |
| 1951 | const code = 'abc12345#$*%' |
| 1952 | const regex = /(\D*)(\d*)(\W*)/ |
| 1953 | assert.strictEqual( |
nothing calls this directly
no outgoing calls
no test coverage detected