JS models for node and the browser