Plato on Github
Report Home
node_modules/es5-ext/object/flatten.js
Maintainability
77.28
Lines of code
17
Difficulty
9.00
Estimated Errors
0.08
Function weight
By Complexity
By SLOC
'use strict'; 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; };