Write once models for Node and browser