1 var copyObject = require('./_copyObject'),
2 keysIn = require('./keysIn');
5 * Converts `value` to a plain object flattening inherited enumerable string
6 * keyed properties of `value` to own properties of the plain object.
12 * @param {*} value The value to convert.
13 * @returns {Object} Returns the converted plain object.
20 * Foo.prototype.c = 3;
22 * _.assign({ 'a': 1 }, new Foo);
23 * // => { 'a': 1, 'b': 2 }
25 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
26 * // => { 'a': 1, 'b': 2, 'c': 3 }
28 function toPlainObject(value) {
29 return copyObject(value, keysIn(value));
32 module.exports = toPlainObject;