Show More
Commit Description:
utf8mb4
Commit Description:
utf8mb4
File last commit:
Show/Diff file:
Action:
node_modules/es5-ext/object/flatten.js | 16 lines | 354 B | application/javascript | JavascriptLexer |
"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;
};