Files: 3a2cc56a1da6d73faff468fb282184e3a66fdc49 / test / archive / test-struct.js
356 bytesRaw
1 | var Struct = require('../struct') |
2 | |
3 | var struct = Struct({ |
4 | a: 'Hello', |
5 | b: 'You', |
6 | c: 123, |
7 | d: Struct({ |
8 | tinker: 'value' |
9 | }) |
10 | }) |
11 | |
12 | console.log(struct()) |
13 | var releases = [ |
14 | struct(x => console.log(x)) |
15 | ] |
16 | |
17 | struct.b.set('Cat') |
18 | |
19 | struct.set({ |
20 | a: 'Hello', |
21 | b: 'Cat', |
22 | c: 123, |
23 | d: { |
24 | tinker: 456 |
25 | } |
26 | }) |
27 | |
28 | while (releases.length) { |
29 | releases.pop()() |
30 | } |
31 |
Built with git-ssb-web