Skip to content
This repository has been archived by the owner on Apr 6, 2018. It is now read-only.

Commit

Permalink
add store class
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderer committed Jan 3, 2018
1 parent 8018b5a commit 0519c52
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 27 deletions.
48 changes: 23 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dfinity-radix-tree": "0.0.9",
"documentation": "^5.3.5",
"level-browserify": "^1.1.1",
"nyc": "^11.3.0",
"nyc": "^11.4.1",
"primea-hypervisor": "0.4.5",
"primea-message": "0.6.1",
"standard": "^10.0.3",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"primea-capability": "0.0.1",
"primea-wasm-container": "0.3.5",
"primea-wasm-container": "0.3.6",
"safe-buffer": "^5.1.1"
}
}
14 changes: 14 additions & 0 deletions store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = class Store {
constructor (key, state) {
this.key = key
this.state = state
}

delete () {
this.state.delete(this.key)
}

update (message) {
this.state.set(this.key, message)
}
}

0 comments on commit 0519c52

Please sign in to comment.