Improve this `unpipe` function?

The new line change likely is just coming from the fact that the code is formatted when you stringify it? Probably nothing to be done there?