I think there's an unhandled edge case here where the opening and closing sequences are split by a data boundary. For example, we might see a `resData` array shaped like this:

```js
["callb", "ack({})", ";"]
```

Since we join all of these chunks into a single string a few lines later anyway, perhaps we should just join it before we do this processing and thus avoid hard-to-debug issues with unusual packet boundaries.

I wonder also if we should anchor the ``);`` regex to the end of the string with ``$`` to ensure we don't corrupt any paren-colon sequences that appear inside literal strings.