Converts value to a plain object flattening inherited enumerable string keyed properties of value to own properties of the plain object.
value
function Foo() { this.b = 2 } Foo.prototype.c = 3 assign({ 'a': 1 }, new Foo) //=> { 'a': 1, 'b': 2 } assign({ 'a': 1 }, toPlainObject(new Foo)) //=> { 'a': 1, 'b': 2, 'c': 3 }
The value to convert.
Returns the converted plain object.
Generated using TypeDoc
Converts
value
to a plain object flattening inherited enumerable string keyed properties ofvalue
to own properties of the plain object.