https://github.com/danibram/object-cleaner
A little function to clean dirty arrays inside objects
https://github.com/danibram/object-cleaner
Last synced: 2 months ago
JSON representation
A little function to clean dirty arrays inside objects
- Host: GitHub
- URL: https://github.com/danibram/object-cleaner
- Owner: danibram
- License: mit
- Created: 2014-12-04T09:23:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-05T13:37:06.000Z (over 10 years ago)
- Last Synced: 2025-02-21T16:19:33.809Z (3 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# object-cleaner [](https://david-dm.org/danibram/object-cleaner)
A little function to clean dirty Objects, find any array with lenght one and and put his content without array.
## Getting Started
Install the module with: `npm install object-cleaner````javascript
var objCleaner = new require('object-cleaner');
objCleaner(Object_to_clean); // Object_cleaned
```## Examples
```javascript
var test = [{
property1: '',
property2: ''
}];
var result = objCleaner(test);
var result = {
property1: '',
property2: ''
};
```## License
Copyright (c) 2014 Daniel Biedma Ramos
Licensed under the MIT license.