UNPKG

378 BTypeScriptView Raw
1/**
2Check if a value is an object.
3
4Keep in mind that array, function, regexp, etc, are objects in JavaScript.
5
6@example
7```
8import isObject from 'is-obj';
9
10isObject({foo: 'bar'});
11//=> true
12
13isObject([1, 2, 3]);
14//=> true
15
16isObject('foo');
17//=> false
18```
19*/
20export default function isObject(value: unknown): value is object; // eslint-disable-line @typescript-eslint/ban-types