Files: 97b585dee0f210742bd323dea327d09701a333d6 / test / test-dict.js
380 bytesRaw
1 | var Dict = require('../dict') |
2 | var Value = require('../value') |
3 | |
4 | var value = Value('blah') |
5 | var dict = Dict({cat: 'meow'}) |
6 | dict(x => console.log(x)) |
7 | dict.put('dog', 'woof') |
8 | dict.put('sheep', 'baa') |
9 | dict.put('cow', 'moo') |
10 | dict.put('human', value) |
11 | dict.delete('sheep') |
12 | console.log('keys =>', dict.keys()) |
13 | dict.set({ cat: 'meow', dog: 'woof', sheep: 'baa', human: value }) |
14 | dict.clear() |
15 |
Built with git-ssb-web