Files: 784a83eb521d4e284478ac2ee4160e2e85a617bc / test / test-set.js
281 bytesRaw
1 | var Set = require('../set') |
2 | var Value = require('../value') |
3 | |
4 | var set = Set() |
5 | var value = Value('ducks') |
6 | set(x => console.log(x)) |
7 | |
8 | set.add('cats') |
9 | set.add('dogs') |
10 | set.add('logs') |
11 | set.add('cats') |
12 | set.add(value) |
13 | |
14 | value.set('cows') |
15 | |
16 | set.delete('dogs') |
17 | set.set(['dogs', 'logs', value]) |
18 |
Built with git-ssb-web