Recursively trim all the strings in a collection (object or array).
$ npm install deep-trim
var deepTrim = require('deep-trim');
deepTrim(' a ')
// 'a'
deepTrim([' a ', 1, '', 'a', ' a']);
// ['a', 1, '', 'a', 'a']
deepTrim({ a: ' a', b: 'b ', c: ' c ', d: 'd' });
// { a: 'a', b: 'b', c: 'c', d: 'd' }
deepTrim({ a: ' a', b: 'b ', c: [' ca', 'cb '], d: 'd' });
// { a: 'a', b: 'b', c: ['ca', 'cb'], d: 'd' }
$ npm test
Released under the MIT License.