Recursively String.trim() object properties of type String.
npm install deep-trim-node
vartrim=require('deep-trim-node');varperson={name: ' John ',surname: 'Johnson ',age: 26,address: {street: '1st Street',city: 'Los Angeles',country: ' USA '},vehicles: [' BMW','Ferrari ','Lamborghini']};person=trim(person);console.log(person);{name: 'John',surname: 'Johnson',age: 26,address: {street: '1st Street',city: 'Los Angeles',country: 'USA'},vehicles: ['BMW','Ferrari','Lamborghini']}To run the test suite, first install the dependencies, then run npm test:
$ npm install
$ npm testDistributed under the MIT License.

