Y
Hacker News
new
|
ask
|
show
|
jobs
by
nicoburns
1711 days ago
If you want to avoid a library then you can do `typeof x === "object" && !Array.isArray(x) && x !== null`. Not ideal, but you can of course turn it into a utility function.