git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 60b86f48100a3b8a9db14f54689cabe117acdff3

Files: 60b86f48100a3b8a9db14f54689cabe117acdff3 / 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