trim-body
Trim parsed request body or any object with strings that needs trimming in one go.
Note: Modifies object in place.
Installation
npm install trim-body
Usage
var trimBody = ; var body = name: first: ' First ' last: ' Last' email: ' user@example.com '; ; // body === {// name: {// first: 'First',// last: 'Last'// },//// email: 'user@example.com'// }
Tests
npm install -g mocha
Then,
npm test
License
MIT