⚠️ This package is deprecated.
Recursively String.trim()
object properties of type String.
Installation
npm install deep-trim-node
Usage Example
var trim = require('deep-trim-node');
var person = {
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'
]
}
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
License
Distributed under the MIT License.