git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 8ced6c46cc8f744d128a65d00c117a79e68918b8

Files: 8ced6c46cc8f744d128a65d00c117a79e68918b8 / stateInterface.js

336 bytesRaw
1const assert = require('assert')
2
3module.exports = class StateInterface {
4 constructor (state) {
5 assert(state, 'must have state')
6 this.state = state
7 }
8
9 set (name, value) {
10 this.state.set([name], value)
11 }
12
13 get (name) {
14 return this.state.get([name])
15 }
16
17 delete (name) {
18 return this.state.del([name])
19 }
20}
21

Built with git-ssb-web