Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Jul 21, 2020
1 parent 8b44209 commit 45b22ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to ch
import isPlainObject from 'is-plain-object';
```

**true** when created by the `Object` constructor.
**true** when created by the `Object` constructor, or Object.create(null).

```js
isPlainObject(Object.create({}));
Expand All @@ -31,6 +31,8 @@ isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true
isPlainObject(null);

This comment has been minimized.

Copy link
@kt3k

kt3k May 20, 2024

Shouldn't this be isPlainObject(Object.create(null))?

isPlainObject(null) returns false with the latest version of this package.

//=> true
```

**false** when not created by the `Object` constructor.
Expand All @@ -44,8 +46,6 @@ isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(null);
//=> false
isPlainObject(Object.create(null));
//=> false
```
Expand Down

0 comments on commit 45b22ea

Please sign in to comment.