const Store = function(initialProps) { this.state = Object.freeze(initialProps); } Store.prototype.set = function(props) { this.state = Object.freeze(Object.assign({}, this.state, props)); return this.state; }; Store.prototype.get = function() { return this.state; } export default Store;