flatten.js #1

  • //
  • guest/
  • jen_bottom/
  • ember/
  • tutorial/
  • testapp/
  • node_modules/
  • es5-ext/
  • object/
  • flatten.js
  • View
  • Commits
  • Open Download .zip Download (355 B)
"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;
};
# Change User Description Committed
#1 23539 jenbottom Adding the basic code for ember test appk, created with 'ember new' command