git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 48df42c8ab634c0d9fc7597e52106352878124fa

Files: 48df42c8ab634c0d9fc7597e52106352878124fa / 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