Hacker News new | ask | show | jobs
by Fckd 1709 days ago
x && !Array.isArray(x) && typeof x === 'object'.

its typical to start off with `var &&` to avoid operations on null & undefined values

1 comments

For environment lacks Array.isArray method i think this works well

!!(x && x.__proto__ === [].__proto__)