Files: cbf829de3c92ce641590e320ffd3f2fb07a3cf61 / 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