Common predicates for Node.js and the browser