3 var isPlainObject = require('./is-plain-object')
4 , forEach = require('./for-each')
8 process = function self(value, key) {
9 if (isPlainObject(value)) forEach(value, self, this);
10 else this[key] = value;
13 module.exports = function (obj) {
15 forEach(obj, process, flattened);