source: frontend/node_modules/is-plain-obj/index.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 567 bytes
Line 
1/**
2Check if a value is a plain object.
3
4An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
5
6@example
7```
8import isPlainObject = require('is-plain-obj');
9
10isPlainObject({foo: 'bar'});
11//=> true
12
13isPlainObject(new Object());
14//=> true
15
16isPlainObject(Object.create(null));
17//=> true
18
19isPlainObject([1, 2, 3]);
20//=> false
21
22class Unicorn {}
23isPlainObject(new Unicorn());
24//=> false
25```
26*/
27declare function isPlainObject<Value = unknown>(value: unknown): value is Record<string | number | symbol, Value>;
28
29export = isPlainObject;
Note: See TracBrowser for help on using the repository browser.