UNPKG
is-obj
Version:
latest (3.0.0)
3.0.0
2.0.0
1.0.1
1.0.0
Check if a value is an object
github.com/sindresorhus/is-obj
sindresorhus/is-obj
is-obj
/
index.js
5 lines
(4 loc)
•
142 B
JavaScript
View Raw
1
2
3
4
5
export
default
function
isObject
(
value
) {
const
type
=
typeof
value;
return
value !==
null
&& (
type
===
'object'
||
type
===
'function'
); }