Function isPlainObject

  • Checks if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null.

    Parameters

    • value: unknown

    Returns value is RecordT

    Since

    1.0.0

    Example

    isPlainObject(new Foo);
    // => false

    Example

    isPlainObject([1, 2, 3]);
    // => false

    Example

    isPlainObject({ 'x': 0, 'y': 0 });
    // => true

    Example

    isPlainObject(Object.create(null));
    // => true