Beta 7 with some repo names changed.
This commit is contained in:
1 parent
0f7b40cca7
commit
963c19493a
3408 files changed
+462217
-15516
No files matched your search
+16
@@ -0,0 +1,16 @@
|
||||
"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;
|
||||
};
|
||||
Reference in new issue
Block a user