Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: