You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
345 B

Check if a value is an object.
Keep in mind that array, function, regexp, etc, are objects in JavaScript.
import isObject = require('is-obj');
isObject({foo: 'bar'});
//=> true
isObject([1, 2, 3]);
//=> true
//=> false
declare function isObject(value: unknown): value is object;
export = isObject;