@k3000/store 0.5.0 → 0.6.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.
- package/generator.mjs +14 -0
- package/package.json +1 -1
- package/test/0/index.mjs +1 -1
- package/test/1/index +0 -0
- package/test/1/index.mjs +1 -1
- package/test/2/index +0 -0
- package/test/3/index +0 -0
- package/test/4/index +0 -0
- package/test/5/index +0 -0
- package/test/6/index +0 -0
- package/test/7/index +0 -0
package/generator.mjs
CHANGED
|
@@ -236,6 +236,13 @@ export const Uint = size => new class Uint extends Type {
|
|
|
236
236
|
return super.step(SCOPE, step > 0 ? step : 1);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
length(length) {
|
|
240
|
+
|
|
241
|
+
length = Number.parseInt(length) || TypeLen.int
|
|
242
|
+
|
|
243
|
+
return super.length(SCOPE, length > 0 && length < TypeLen.int ? length : TypeLen.int);
|
|
244
|
+
}
|
|
245
|
+
|
|
239
246
|
}()
|
|
240
247
|
|
|
241
248
|
/**
|
|
@@ -287,6 +294,13 @@ export const Int = size => new class Int extends Type {
|
|
|
287
294
|
return super.step(SCOPE, step === 0 ? 1 : step);
|
|
288
295
|
}
|
|
289
296
|
|
|
297
|
+
length(length) {
|
|
298
|
+
|
|
299
|
+
length = Number.parseInt(length) || TypeLen.int
|
|
300
|
+
|
|
301
|
+
return super.length(SCOPE, length > 0 && length < TypeLen.int ? length : TypeLen.int);
|
|
302
|
+
}
|
|
303
|
+
|
|
290
304
|
}()
|
|
291
305
|
|
|
292
306
|
export const BigUint = remark => new class BigUint extends Type {
|
package/package.json
CHANGED
package/test/0/index.mjs
CHANGED
package/test/1/index
CHANGED
|
Binary file
|
package/test/1/index.mjs
CHANGED
|
@@ -387,7 +387,7 @@ export const remark = Symbol('remark')
|
|
|
387
387
|
|
|
388
388
|
export const close = () => storage.close()
|
|
389
389
|
|
|
390
|
-
export const getStruct =
|
|
390
|
+
export const getStruct = name => struct(storage, remark, name)
|
|
391
391
|
|
|
392
392
|
/**
|
|
393
393
|
* @type {import('./type').Storage}
|
package/test/2/index
CHANGED
|
Binary file
|
package/test/3/index
CHANGED
|
Binary file
|
package/test/4/index
CHANGED
|
Binary file
|
package/test/5/index
CHANGED
|
Binary file
|
package/test/6/index
CHANGED
|
Binary file
|
package/test/7/index
CHANGED
|
Binary file
|