Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wankdanker/node-replace-empty-objects
Recursively replace empty objects with null
https://github.com/wankdanker/node-replace-empty-objects
Last synced: 14 days ago
JSON representation
Recursively replace empty objects with null
- Host: GitHub
- URL: https://github.com/wankdanker/node-replace-empty-objects
- Owner: wankdanker
- Created: 2014-09-29T16:08:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-12T18:07:05.000Z (over 7 years ago)
- Last Synced: 2024-11-06T01:17:18.541Z (2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
replace-empty-objects
---------------------[![Build Status](https://travis-ci.org/wankdanker/node-replace-empty-objects.svg)](https://travis-ci.org/wankdanker/node-replace-empty-objects)
Recursively replace empty objects with null
install
-------```bash
npm install replace-empty-objects
```usage
-----```js
var replaceEmptyObjects = require('replace-empty-objects');var obj = {
a : {
b : {}
, c : {}
, d : {}
}
, b : {}
};replaceEmptyObjects(obj);
console.log(obj);
/*
{
a : {
b : null
, c : null
, d : null
}
, b : null
}
*/
```license
-------MIT