@mblaney/holster 1.0.35 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/build/holster.js +3 -3
  2. package/build/holster.js.map +3 -3
  3. package/dist/holster.js +4 -0
  4. package/dist/holster.js.map +7 -0
  5. package/package.json +22 -5
  6. package/src/dup.js +4 -5
  7. package/src/get.js +10 -19
  8. package/src/ham.js +22 -49
  9. package/src/holster.js +172 -58
  10. package/src/index.js +1 -1
  11. package/src/radisk.js +89 -86
  12. package/src/sea-utils.js +1 -1
  13. package/src/sea.js +0 -52
  14. package/src/store.js +8 -8
  15. package/src/user.js +0 -4
  16. package/src/wire.js +209 -79
  17. package/ts/src/array.ts +78 -0
  18. package/ts/src/buffer.ts +441 -0
  19. package/ts/src/dup.ts +38 -0
  20. package/ts/src/get.ts +83 -0
  21. package/ts/src/ham.ts +258 -0
  22. package/ts/src/holster.ts +968 -0
  23. package/ts/src/index.ts +35 -0
  24. package/ts/src/radisk.ts +591 -0
  25. package/ts/src/radix.ts +157 -0
  26. package/ts/src/schemas.ts +515 -0
  27. package/ts/src/sea-utils.ts +103 -0
  28. package/ts/src/sea.ts +388 -0
  29. package/ts/src/store.ts +321 -0
  30. package/ts/src/user.ts +377 -0
  31. package/ts/src/utils.ts +232 -0
  32. package/ts/src/wire.ts +961 -0
  33. package/.dockerignore +0 -9
  34. package/.github/workflows/node.js.yml +0 -31
  35. package/.github/workflows/npm-publish.yml +0 -33
  36. package/Dockerfile +0 -20
  37. package/examples/index.html +0 -33
  38. package/examples/index.js +0 -49
  39. package/examples/user.html +0 -31
  40. package/examples/user.js +0 -93
  41. package/examples/wire.html +0 -27
  42. package/examples/wire.js +0 -55
  43. package/test/holster.get.test.js +0 -94
  44. package/test/holster.lex.test.js +0 -196
  45. package/test/holster.off.test.js +0 -53
  46. package/test/holster.on.test.js +0 -264
  47. package/test/holster.put.test.js +0 -358
  48. package/test/holster.secure.test.js +0 -202
  49. package/test/holster.user.get.test.js +0 -114
  50. package/test/holster.user.lex.test.js +0 -149
  51. package/test/holster.user.off.test.js +0 -73
  52. package/test/holster.user.on.test.js +0 -300
  53. package/test/holster.user.put.test.js +0 -463
  54. package/test/kitty/! +0 -9
  55. package/test/names.js +0 -225
  56. package/test/radisk.cache.test.js +0 -213
  57. package/test/radisk.test.js +0 -331
  58. package/test/radix.test.js +0 -117
  59. package/test/sea.test.js +0 -284
  60. package/test/split.test.js +0 -317
  61. package/test/store.test.js +0 -316
  62. package/test/system/basic.test.js +0 -29
  63. package/test/system/chained-on.test.js +0 -41
  64. package/test/system/concurrent-listeners.test.js +0 -125
  65. package/test/system/immediate-read.test.js +0 -30
  66. package/test/system/listener-before-data.test.js +0 -51
  67. package/test/system/promise-wrapper.test.js +0 -47
  68. package/test/system/user-chained-on.test.js +0 -60
  69. package/test/system/user-concurrent-listeners.test.js +0 -142
  70. package/test/system/user-listener-before-data.test.js +0 -66
  71. package/test/user.test.js +0 -173
  72. package/test/wire.test.js +0 -158
package/test/sea.test.js DELETED
@@ -1,284 +0,0 @@
1
- import {describe, test} from "node:test"
2
- import assert from "node:assert/strict"
3
- import SEA from "../src/sea.js"
4
-
5
- // The JWK format uses "base64url" encoding, which means "+" replaced with "-"
6
- // and "/" with "_" and removing "=" padding. So public and private keys here
7
- // are strings of alphanumeric characters and underscores (regex: \w), as well
8
- // as dashes. The x and y values of public keys are joined by a full stop, so
9
- // these conditions match the following two regular expressions:
10
- const pubRegex = /^(\w|\-)+\.(\w|\-)+$/
11
- const privRegex = /^(\w|\-)+$/
12
-
13
- describe("SEA", () => {
14
- test("pair await", (t, done) => {
15
- ;(async () => {
16
- const pair = await SEA.pair()
17
- assert.match(pair.pub, pubRegex)
18
- assert.match(pair.priv, privRegex)
19
- assert.match(pair.epub, pubRegex)
20
- assert.match(pair.epriv, privRegex)
21
- done()
22
- })()
23
- })
24
-
25
- test("pair callback", (t, done) => {
26
- SEA.pair(pair => {
27
- assert.match(pair.pub, pubRegex)
28
- assert.match(pair.priv, privRegex)
29
- assert.match(pair.epub, pubRegex)
30
- assert.match(pair.epriv, privRegex)
31
- done()
32
- })
33
- })
34
-
35
- test("encrypt and decrypt string await", (t, done) => {
36
- ;(async () => {
37
- const pair = await SEA.pair()
38
- const enc = await SEA.encrypt("hello self", pair)
39
- const dec = await SEA.decrypt(enc, pair)
40
- assert.equal(dec, "hello self")
41
- done()
42
- })()
43
- })
44
-
45
- test("encrypt and decrypt with wrong key", (t, done) => {
46
- ;(async () => {
47
- const alice = await SEA.pair()
48
- const bob = await SEA.pair()
49
- const enc = await SEA.encrypt("alice secret", alice)
50
- const dec = await SEA.decrypt(enc, bob)
51
- assert.equal(dec, null)
52
- done()
53
- })()
54
- })
55
-
56
- test("encrypt and decrypt string callback", (t, done) => {
57
- SEA.pair(pair => {
58
- SEA.encrypt("hello self", pair, enc => {
59
- SEA.decrypt(enc, pair, dec => {
60
- assert.equal(dec, "hello self")
61
- done()
62
- })
63
- })
64
- })
65
- })
66
-
67
- test("encrypt and decrypt object await", (t, done) => {
68
- ;(async () => {
69
- const pair = await SEA.pair()
70
- const enc = await SEA.encrypt({test: "hello self"}, pair)
71
- const dec = await SEA.decrypt(enc, pair)
72
- assert.deepEqual(dec, {test: "hello self"})
73
- done()
74
- })()
75
- })
76
-
77
- test("encrypt and decrypt object callback", (t, done) => {
78
- SEA.pair(pair => {
79
- SEA.encrypt({test: "hello self"}, pair, enc => {
80
- SEA.decrypt(enc, pair, dec => {
81
- assert.deepEqual(dec, {test: "hello self"})
82
- done()
83
- })
84
- })
85
- })
86
- })
87
-
88
- test("sign and verify string await", (t, done) => {
89
- ;(async () => {
90
- const pair = await SEA.pair()
91
- const signed = await SEA.sign("hello self", pair)
92
- const verified = await SEA.verify(signed, pair)
93
- assert.equal(verified, "hello self")
94
- done()
95
- })()
96
- })
97
-
98
- test("sign and verify with wrong key", (t, done) => {
99
- ;(async () => {
100
- const alice = await SEA.pair()
101
- const bob = await SEA.pair()
102
- const signed = await SEA.sign("signed by alice", alice)
103
- const verified = await SEA.verify(signed, bob)
104
- assert.equal(verified, null)
105
- done()
106
- })()
107
- })
108
-
109
- test("sign and verify string callback", (t, done) => {
110
- SEA.pair(pair => {
111
- SEA.sign("hello self", pair, signed => {
112
- SEA.verify(signed, pair, verified => {
113
- assert.equal(verified, "hello self")
114
- done()
115
- })
116
- })
117
- })
118
- })
119
-
120
- test("sign and verify object await", (t, done) => {
121
- ;(async () => {
122
- const pair = await SEA.pair()
123
- const signed = await SEA.sign({test: "hello self"}, pair)
124
- const verified = await SEA.verify(signed, pair)
125
- assert.deepEqual(verified, {test: "hello self"})
126
- done()
127
- })()
128
- })
129
-
130
- test("sign and verify object callback", (t, done) => {
131
- SEA.pair(pair => {
132
- SEA.sign({test: "hello self"}, pair, signed => {
133
- SEA.verify(signed, pair, verified => {
134
- assert.deepEqual(verified, {test: "hello self"})
135
- done()
136
- })
137
- })
138
- })
139
- })
140
-
141
- test("work with salt encrypt string callback", (t, done) => {
142
- SEA.work("hello", "salt", work => {
143
- SEA.encrypt("hello work", work, enc => {
144
- SEA.decrypt(enc, work, dec => {
145
- assert.equal(dec, "hello work")
146
- done()
147
- })
148
- })
149
- })
150
- })
151
-
152
- test("work with salt encrypt string await", (t, done) => {
153
- ;(async () => {
154
- const work = await SEA.work("hello", "salt")
155
- const enc = await SEA.encrypt("hello work", work)
156
- const dec = await SEA.decrypt(enc, work)
157
- assert.equal(dec, "hello work")
158
- done()
159
- })()
160
- })
161
-
162
- test("work with salt encrypt object callback", (t, done) => {
163
- SEA.work("hello", "salt", work => {
164
- SEA.encrypt({test: "hello work"}, work, enc => {
165
- SEA.decrypt(enc, work, dec => {
166
- assert.deepEqual(dec, {test: "hello work"})
167
- done()
168
- })
169
- })
170
- })
171
- })
172
-
173
- test("work with salt encrypt object await", (t, done) => {
174
- ;(async () => {
175
- const work = await SEA.work("hello", "salt")
176
- const enc = await SEA.encrypt({test: "hello work"}, work)
177
- const dec = await SEA.decrypt(enc, work)
178
- assert.deepEqual(dec, {test: "hello work"})
179
- done()
180
- })()
181
- })
182
-
183
- test("work no salt encrypt string callback", (t, done) => {
184
- SEA.work("hello", work => {
185
- SEA.encrypt("hello work", work, enc => {
186
- SEA.decrypt(enc, work, dec => {
187
- assert.equal(dec, "hello work")
188
- done()
189
- })
190
- })
191
- })
192
- })
193
-
194
- test("work no salt encrypt string await", (t, done) => {
195
- ;(async () => {
196
- const work = await SEA.work("hello")
197
- const enc = await SEA.encrypt("hello work", work)
198
- const dec = await SEA.decrypt(enc, work)
199
- assert.equal(dec, "hello work")
200
- done()
201
- })()
202
- })
203
-
204
- test("work no salt encrypt object callback", (t, done) => {
205
- SEA.work("hello", work => {
206
- SEA.encrypt({test: "hello work"}, work, enc => {
207
- SEA.decrypt(enc, work, dec => {
208
- assert.deepEqual(dec, {test: "hello work"})
209
- done()
210
- })
211
- })
212
- })
213
- })
214
-
215
- test("work no salt encrypt object await", (t, done) => {
216
- ;(async () => {
217
- const work = await SEA.work("hello")
218
- const enc = await SEA.encrypt({test: "hello work"}, work)
219
- const dec = await SEA.decrypt(enc, work)
220
- assert.deepEqual(dec, {test: "hello work"})
221
- done()
222
- })()
223
- })
224
-
225
- test("secret string callback", (t, done) => {
226
- SEA.pair(alice => {
227
- SEA.pair(bob => {
228
- SEA.secret(bob, alice, to => {
229
- SEA.encrypt("shared data", to, enc => {
230
- SEA.secret(alice, bob, from => {
231
- SEA.decrypt(enc, from, dec => {
232
- assert.equal(dec, "shared data")
233
- done()
234
- })
235
- })
236
- })
237
- })
238
- })
239
- })
240
- })
241
-
242
- test("secret string await", (t, done) => {
243
- ;(async () => {
244
- const alice = await SEA.pair()
245
- const bob = await SEA.pair()
246
- const to = await SEA.secret(bob, alice)
247
- const enc = await SEA.encrypt("shared data", to)
248
- const from = await SEA.secret(alice, bob)
249
- const dec = await SEA.decrypt(enc, from)
250
- assert.equal(dec, "shared data")
251
- done()
252
- })()
253
- })
254
-
255
- test("secret object callback", (t, done) => {
256
- SEA.pair(alice => {
257
- SEA.pair(bob => {
258
- SEA.secret(bob, alice, to => {
259
- SEA.encrypt({test: "shared data"}, to, enc => {
260
- SEA.secret(alice, bob, from => {
261
- SEA.decrypt(enc, from, dec => {
262
- assert.deepEqual(dec, {test: "shared data"})
263
- done()
264
- })
265
- })
266
- })
267
- })
268
- })
269
- })
270
- })
271
-
272
- test("secret object await", (t, done) => {
273
- ;(async () => {
274
- const alice = await SEA.pair()
275
- const bob = await SEA.pair()
276
- const to = await SEA.secret(bob, alice)
277
- const enc = await SEA.encrypt({test: "shared data"}, to)
278
- const from = await SEA.secret(alice, bob)
279
- const dec = await SEA.decrypt(enc, from)
280
- assert.deepEqual(dec, {test: "shared data"})
281
- done()
282
- })()
283
- })
284
- })
@@ -1,317 +0,0 @@
1
- import {describe, test} from "node:test"
2
- import assert from "node:assert/strict"
3
- import Radisk from "../src/radisk.js"
4
-
5
- // ASCII character for enquiry.
6
- const enq = String.fromCharCode(5)
7
-
8
- describe("split", () => {
9
- const puts = {}
10
- const opt = {
11
- size: 100,
12
- store: {
13
- get: (file, cb) => {
14
- cb(null, puts[file])
15
- },
16
- put: (file, data, cb) => {
17
- puts[file] = data
18
- cb(null)
19
- },
20
- list: cb => {
21
- Object.keys(puts).sort().forEach(cb)
22
- cb(null)
23
- },
24
- },
25
- }
26
- const radisk = Radisk(opt)
27
- const now = Date.now()
28
- const lorem =
29
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
30
- const parent = () => {
31
- return (
32
- '\x1F+0\x1F#\x1F"parent\x05\x1F\n' +
33
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F+\x03' +
34
- now +
35
- "\x1F\n" +
36
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+42\x03' +
37
- now +
38
- "\x1F\n" +
39
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#child\x03' +
40
- now +
41
- "\x1F\n" +
42
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"parent value\x03' +
43
- now +
44
- "\x1F\n"
45
- )
46
- }
47
- const child = () => {
48
- return (
49
- '\x1F+0\x1F#\x1F"child\x05\x1F\n' +
50
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F+\x03' +
51
- now +
52
- "\x1F\n" +
53
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+43\x03' +
54
- now +
55
- "\x1F\n" +
56
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#grandchild\x03' +
57
- now +
58
- "\x1F\n" +
59
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"child value\x03' +
60
- now +
61
- "\x1F\n"
62
- )
63
- }
64
- const grandchild = () => {
65
- return (
66
- '\x1F+0\x1F#\x1F"grandchild\x05\x1F\n' +
67
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F-\x03' +
68
- now +
69
- "\x1F\n" +
70
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+44\x03' +
71
- now +
72
- "\x1F\n" +
73
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#toys\x03' +
74
- now +
75
- "\x1F\n" +
76
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"grandchild value\x03' +
77
- now +
78
- "\x1F\n"
79
- )
80
- }
81
- const toys = () => {
82
- return (
83
- '\x1F+0\x1F#\x1F"toys\x05\x1F\n' +
84
- '\x1F+1\x1F#\x1F"b\x1F\n' +
85
- '\x1F+2\x1F#\x1F"all\x1F=\x1F"green\x03' +
86
- now +
87
- "\x1F\n" +
88
- '\x1F+2\x1F#\x1F"ook\x1F=\x1F"' +
89
- lorem +
90
- "\x03" +
91
- now +
92
- "\x1F\n" +
93
- '\x1F+1\x1F#\x1F"car\x1F=\x1F"red\x03' +
94
- now +
95
- "\x1F\n"
96
- )
97
- }
98
- const alpha = () => {
99
- return (
100
- '\x1F+0\x1F#\x1F"alpha\x05\x1F\n' +
101
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F+\x03' +
102
- now +
103
- "\x1F\n" +
104
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+1\x03' +
105
- now +
106
- "\x1F\n" +
107
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#beta\x03' +
108
- now +
109
- "\x1F\n" +
110
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"alpha value\x03' +
111
- now +
112
- "\x1F\n"
113
- )
114
- }
115
-
116
- test("write a parent node", (t, done) => {
117
- radisk("parent" + enq + "string", ["parent value", now])
118
- radisk("parent" + enq + "number", [42, now])
119
- radisk("parent" + enq + "boolean", [true, now])
120
- radisk("parent" + enq + "rel", [{"#": "child"}, now])
121
-
122
- setTimeout(() => {
123
- assert.deepEqual(puts, {
124
- "!": parent(),
125
- })
126
- done()
127
- }, 10)
128
- })
129
-
130
- test("write a child node", (t, done) => {
131
- radisk("child" + enq + "string", ["child value", now])
132
- radisk("child" + enq + "number", [43, now])
133
- radisk("child" + enq + "boolean", [true, now])
134
- radisk("child" + enq + "rel", [{"#": "grandchild"}, now])
135
-
136
- setTimeout(() => {
137
- assert.deepEqual(puts, {
138
- "!": child(),
139
- parent: parent(),
140
- })
141
- done()
142
- }, 10)
143
- })
144
-
145
- test("write a grandchild node", (t, done) => {
146
- radisk("grandchild" + enq + "string", ["grandchild value", now])
147
- radisk("grandchild" + enq + "number", [44, now])
148
- radisk("grandchild" + enq + "boolean", [false, now])
149
- radisk("grandchild" + enq + "rel", [{"#": "toys"}, now])
150
-
151
- setTimeout(() => {
152
- assert.deepEqual(puts, {
153
- "!": child(),
154
- parent: parent(),
155
- grandchild: grandchild(),
156
- })
157
- done()
158
- }, 10)
159
- })
160
-
161
- test("write grandchild toys", (t, done) => {
162
- radisk("toys" + enq + "car", ["red", now])
163
- radisk("toys" + enq + "ball", ["green", now])
164
- radisk("toys" + enq + "book", [lorem, now])
165
-
166
- setTimeout(() => {
167
- assert.deepEqual(puts, {
168
- "!": child(),
169
- parent: parent(),
170
- grandchild: grandchild(),
171
- toys: toys(),
172
- })
173
- done()
174
- }, 10)
175
- })
176
-
177
- test("write new first node", (t, done) => {
178
- radisk("alpha" + enq + "string", ["alpha value", now])
179
- radisk("alpha" + enq + "number", [1, now])
180
- radisk("alpha" + enq + "boolean", [true, now])
181
- radisk("alpha" + enq + "rel", [{"#": "beta"}, now])
182
- radisk("beta" + enq + "string", ["beta value", now])
183
-
184
- setTimeout(() => {
185
- assert.deepEqual(puts, {
186
- "!": alpha(),
187
- beta:
188
- '\x1F+0\x1F#\x1F"beta\x05string\x1F=\x1F"beta value\x03' +
189
- now +
190
- "\x1F\n" +
191
- child(),
192
- parent: parent(),
193
- grandchild: grandchild(),
194
- toys: toys(),
195
- })
196
- done()
197
- }, 10)
198
- })
199
-
200
- // Note that "beta" remains a separate file here (nodes aren't combined).
201
- test("write new second node", (t, done) => {
202
- radisk("be" + enq + "string", ["be value", now])
203
-
204
- setTimeout(() => {
205
- assert.deepEqual(puts, {
206
- "!": alpha(),
207
- be:
208
- '\x1F+0\x1F#\x1F"be\x05string\x1F=\x1F"be value\x03' + now + "\x1F\n",
209
- beta:
210
- '\x1F+0\x1F#\x1F"beta\x05string\x1F=\x1F"beta value\x03' +
211
- now +
212
- "\x1F\n" +
213
- child(),
214
- parent: parent(),
215
- grandchild: grandchild(),
216
- toys: toys(),
217
- })
218
- done()
219
- }, 10)
220
- })
221
-
222
- test("add a parent item", (t, done) => {
223
- radisk("parent" + enq + "after", ["this was added after", now])
224
-
225
- setTimeout(() => {
226
- assert.deepEqual(puts, {
227
- "!": alpha(),
228
- be:
229
- '\x1F+0\x1F#\x1F"be\x05string\x1F=\x1F"be value\x03' + now + "\x1F\n",
230
- beta:
231
- '\x1F+0\x1F#\x1F"beta\x05string\x1F=\x1F"beta value\x03' +
232
- now +
233
- "\x1F\n" +
234
- child(),
235
- grandchild: grandchild(),
236
- parent:
237
- '\x1F+0\x1F#\x1F"parent\x05\x1F\n' +
238
- '\x1F+1\x1F#\x1F"after\x1F=\x1F"this was added after\x03' +
239
- now +
240
- "\x1F\n" +
241
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F+\x03' +
242
- now +
243
- "\x1F\n" +
244
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+42\x03' +
245
- now +
246
- "\x1F\n" +
247
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#child\x03' +
248
- now +
249
- "\x1F\n" +
250
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"parent value\x03' +
251
- now +
252
- "\x1F\n",
253
- toys: toys(),
254
- })
255
- done()
256
- }, 10)
257
- })
258
-
259
- test("add two child items", (t, done) => {
260
- radisk("child" + enq + "book", [lorem, now])
261
- radisk("child" + enq + "pi", [3.14159, now])
262
-
263
- setTimeout(() => {
264
- assert.deepEqual(puts, {
265
- "!": alpha(),
266
- be:
267
- '\x1F+0\x1F#\x1F"be\x05string\x1F=\x1F"be value\x03' + now + "\x1F\n",
268
- beta:
269
- '\x1F+0\x1F#\x1F"beta\x05string\x1F=\x1F"beta value\x03' +
270
- now +
271
- "\x1F\n" +
272
- '\x1F+0\x1F#\x1F"child\x05\x1F\n' +
273
- '\x1F+1\x1F#\x1F"boo\x1F\n' +
274
- '\x1F+2\x1F#\x1F"k\x1F=\x1F"' +
275
- lorem +
276
- "\x03" +
277
- now +
278
- "\x1F\n" +
279
- '\x1F+2\x1F#\x1F"lean\x1F=\x1F+\x03' +
280
- now +
281
- "\x1F\n" +
282
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+43\x03' +
283
- now +
284
- "\x1F\n" +
285
- '\x1F+1\x1F#\x1F"pi\x1F=\x1F+3.14159\x03' +
286
- now +
287
- "\x1F\n" +
288
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#grandchild\x03' +
289
- now +
290
- "\x1F\n" +
291
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"child value\x03' +
292
- now +
293
- "\x1F\n",
294
- grandchild: grandchild(),
295
- parent:
296
- '\x1F+0\x1F#\x1F"parent\x05\x1F\n' +
297
- '\x1F+1\x1F#\x1F"after\x1F=\x1F"this was added after\x03' +
298
- now +
299
- "\x1F\n" +
300
- '\x1F+1\x1F#\x1F"boolean\x1F=\x1F+\x03' +
301
- now +
302
- "\x1F\n" +
303
- '\x1F+1\x1F#\x1F"number\x1F=\x1F+42\x03' +
304
- now +
305
- "\x1F\n" +
306
- '\x1F+1\x1F#\x1F"rel\x1F=\x1F#child\x03' +
307
- now +
308
- "\x1F\n" +
309
- '\x1F+1\x1F#\x1F"string\x1F=\x1F"parent value\x03' +
310
- now +
311
- "\x1F\n",
312
- toys: toys(),
313
- })
314
- done()
315
- }, 10)
316
- })
317
- })