Lightweight Node.js string transformations