orionsoft-react-scripts
Version:
Orionsoft Configuration and scripts for Create React App.
18 lines (13 loc) • 355 B
JavaScript
var isPlainObject = require('./is-plain-object')
, forEach = require('./for-each')
, process;
process = function self(value, key) {
if (isPlainObject(value)) forEach(value, self, this);
else this[key] = value;
};
module.exports = function (obj) {
var flattened = {};
forEach(obj, process, flattened);
return flattened;
};
;