Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/toPlainObject

Index

Functions Lang

Lang Functions

  • default(value: any): {}
  • Converts value to a plain object flattening inherited enumerable string keyed properties of value to own properties of the plain object.

    example
     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 }

    Parameters

    • value: any

      The value to convert.

    Returns {}

    Returns the converted plain object.

    Generated using TypeDoc