(t, e)
| 647 | return this.original !== this.toString(); |
| 648 | } |
| 649 | replace(t, e) { |
| 650 | function n(r, s) { |
| 651 | return typeof e == 'string' |
| 652 | ? e.replace(/\$(\$|&|\d+)/g, (h, o) => |
| 653 | o === '$' ? '$' : o === '&' ? r[0] : +o < r.length ? r[+o] : `$${o}`, |
| 654 | ) |
| 655 | : e(...r, r.index, s, r.groups); |
| 656 | } |
| 657 | function i(r, s) { |
| 658 | let h; |
| 659 | const o = []; |
| 660 | for (; (h = r.exec(s)); ) o.push(h); |
| 661 | return o; |
| 662 | } |
| 663 | if (typeof t != 'string' && t.global) |
| 664 | i(t, this.original).forEach((s) => { |
| 665 | s.index != null && this.overwrite(s.index, s.index + s[0].length, n(s, this.original)); |
| 666 | }); |
| 667 | else { |
| 668 | const r = this.original.match(t); |
| 669 | r && r.index != null && this.overwrite(r.index, r.index + r[0].length, n(r, this.original)); |
| 670 | } |
| 671 | return this; |
| 672 | } |
| 673 | } |
| 674 | const v = Object.prototype.hasOwnProperty; |
| 675 | class S { |
no test coverage detected