cborg 5.1.1 → 5.1.3
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/.github/workflows/test-and-release.yml +2 -2
- package/CHANGELOG.md +12 -0
- package/lib/0uint.js +1 -1
- package/lib/1negint.js +1 -2
- package/lib/7float.js +0 -3
- package/lib/bin.js +0 -11
- package/lib/bl.js +0 -1
- package/lib/byte-utils.js +1 -14
- package/lib/decode.js +0 -2
- package/lib/diagnostic.js +0 -4
- package/lib/encode.js +0 -3
- package/lib/is.js +0 -3
- package/lib/json/decode.js +0 -6
- package/lib/json/encode.js +0 -10
- package/lib/jump.js +0 -2
- package/lib/length.js +0 -1
- package/lib/token.js +0 -3
- package/package.json +3 -5
- package/types/lib/1negint.d.ts.map +1 -1
- package/types/lib/bl.d.ts.map +1 -1
- package/types/lib/byte-utils.d.ts.map +1 -1
- package/types/lib/decode.d.ts.map +1 -1
- package/types/lib/diagnostic.d.ts.map +1 -1
- package/types/lib/encode.d.ts.map +1 -1
- package/types/lib/is.d.ts.map +1 -1
- package/types/lib/json/decode.d.ts.map +1 -1
- package/types/lib/json/encode.d.ts.map +1 -1
- package/types/lib/jump.d.ts.map +1 -1
- package/types/lib/length.d.ts.map +1 -1
- package/types/lib/token.d.ts.map +1 -1
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
runs-on: ${{ matrix.os }}
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout Repository
|
|
13
|
-
uses: actions/checkout@
|
|
13
|
+
uses: actions/checkout@v7
|
|
14
14
|
- name: Use Node.js ${{ matrix.node }}
|
|
15
15
|
uses: actions/setup-node@v6.4.0
|
|
16
16
|
with:
|
|
@@ -34,7 +34,7 @@ jobs:
|
|
|
34
34
|
id-token: write
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout
|
|
37
|
-
uses: actions/checkout@
|
|
37
|
+
uses: actions/checkout@v7
|
|
38
38
|
with:
|
|
39
39
|
fetch-depth: 0
|
|
40
40
|
- name: Setup Node.js
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [5.1.3](https://github.com/rvagg/cborg/compare/v5.1.2...v5.1.3) (2026-06-22)
|
|
2
|
+
|
|
3
|
+
### Trivial Changes
|
|
4
|
+
|
|
5
|
+
* **deps:** bump actions/checkout from 6 to 7 ([#177](https://github.com/rvagg/cborg/issues/177)) ([a0a959e](https://github.com/rvagg/cborg/commit/a0a959e266c9dce3022571ffef4761d7b7c8e0fa))
|
|
6
|
+
|
|
7
|
+
## [5.1.2](https://github.com/rvagg/cborg/compare/v5.1.1...v5.1.2) (2026-06-22)
|
|
8
|
+
|
|
9
|
+
### Trivial Changes
|
|
10
|
+
|
|
11
|
+
* remove c8 support ([#179](https://github.com/rvagg/cborg/issues/179)) ([47e43b3](https://github.com/rvagg/cborg/commit/47e43b3d419ceb84f4abdd1b73a378a9530c200a))
|
|
12
|
+
|
|
1
13
|
## [5.1.1](https://github.com/rvagg/cborg/compare/v5.1.0...v5.1.1) (2026-04-28)
|
|
2
14
|
|
|
3
15
|
### Trivial Changes
|
package/lib/0uint.js
CHANGED
|
@@ -223,5 +223,5 @@ encodeUintValue.encodedSize = function encodedSize (uint) {
|
|
|
223
223
|
* @returns {number}
|
|
224
224
|
*/
|
|
225
225
|
encodeUint.compareTokens = function compareTokens (tok1, tok2) {
|
|
226
|
-
return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 :
|
|
226
|
+
return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 : 0
|
|
227
227
|
}
|
package/lib/1negint.js
CHANGED
|
@@ -83,7 +83,6 @@ export function encodeNegint (writer, token) {
|
|
|
83
83
|
encodeNegint.encodedSize = function encodedSize (token) {
|
|
84
84
|
const negint = token.value
|
|
85
85
|
const unsigned = (typeof negint === 'bigint' ? (negint * neg1b - pos1b) : (negint * -1 - 1))
|
|
86
|
-
/* c8 ignore next 4 */
|
|
87
86
|
// handled by quickEncode, we shouldn't get here but it's included for completeness
|
|
88
87
|
if (unsigned < uint.uintBoundaries[0]) {
|
|
89
88
|
return 1
|
|
@@ -107,5 +106,5 @@ encodeNegint.encodedSize = function encodedSize (token) {
|
|
|
107
106
|
*/
|
|
108
107
|
encodeNegint.compareTokens = function compareTokens (tok1, tok2) {
|
|
109
108
|
// opposite of the uint comparison since we store the uint version in bytes
|
|
110
|
-
return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 :
|
|
109
|
+
return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 : 0
|
|
111
110
|
}
|
package/lib/7float.js
CHANGED
|
@@ -189,7 +189,6 @@ function encodeFloat16 (inp) {
|
|
|
189
189
|
const exponent = (valu32 & 0x7f800000) >> 23
|
|
190
190
|
const mantissa = valu32 & 0x7fffff
|
|
191
191
|
|
|
192
|
-
/* c8 ignore next 6 */
|
|
193
192
|
if (exponent === 0xff) {
|
|
194
193
|
// too big, Infinity, but this should be hard (impossible?) to trigger
|
|
195
194
|
dataView.setUint16(0, 0x7c00, false)
|
|
@@ -201,7 +200,6 @@ function encodeFloat16 (inp) {
|
|
|
201
200
|
// chunks of logic here borrowed from https://github.com/PJK/libcbor/blob/c78f437182533e3efa8d963ff4b945bb635c2284/src/cbor/encoding.c#L127
|
|
202
201
|
const logicalExponent = exponent - 127
|
|
203
202
|
// Now we know that 2^exponent <= 0 logically
|
|
204
|
-
/* c8 ignore next 6 */
|
|
205
203
|
if (logicalExponent < -24) {
|
|
206
204
|
/* No unambiguous representation exists, this float is not a half float
|
|
207
205
|
and is too small to be represented using a half, round off to zero.
|
|
@@ -247,7 +245,6 @@ function readFloat16 (ui8a, pos) {
|
|
|
247
245
|
val = mant * (2 ** -24)
|
|
248
246
|
} else if (exp !== 31) {
|
|
249
247
|
val = (mant + 1024) * (2 ** (exp - 25))
|
|
250
|
-
/* c8 ignore next 4 */
|
|
251
248
|
} else {
|
|
252
249
|
// may not be possible to get here
|
|
253
250
|
val = mant === 0 ? Infinity : NaN
|
package/lib/bin.js
CHANGED
|
@@ -41,7 +41,6 @@ async function fromStdin () {
|
|
|
41
41
|
*/
|
|
42
42
|
function fromHex (str) {
|
|
43
43
|
str = str.replace(/\r?\n/g, '') // let's be charitable
|
|
44
|
-
/* c8 ignore next 3 */
|
|
45
44
|
if (!(/^([0-9a-f]{2})*$/i).test(str)) {
|
|
46
45
|
throw new Error('Input string is not hexadecimal format')
|
|
47
46
|
}
|
|
@@ -77,7 +76,6 @@ async function run () {
|
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
case 'bin2diag': {
|
|
80
|
-
/* c8 ignore next 1 */
|
|
81
79
|
const { argv, width } = argvWidth()
|
|
82
80
|
const bin = argv.length < 4 ? (await fromStdin()) : new TextEncoder().encode(argv[3])
|
|
83
81
|
for (const line of tokensToDiagnostic(bin, width)) {
|
|
@@ -88,36 +86,28 @@ async function run () {
|
|
|
88
86
|
|
|
89
87
|
case 'bin2hex': {
|
|
90
88
|
// this is really nothing to do with cbor.. just handy
|
|
91
|
-
/* c8 ignore next 1 */
|
|
92
89
|
const bin = process.argv.length < 4 ? (await fromStdin()) : new TextEncoder().encode(process.argv[3])
|
|
93
90
|
return console.log(toHex(bin))
|
|
94
91
|
}
|
|
95
92
|
|
|
96
93
|
case 'bin2json': {
|
|
97
94
|
const { argv, pretty } = argvPretty()
|
|
98
|
-
/* c8 ignore next 1 */
|
|
99
95
|
const bin = argv.length < 4 ? (await fromStdin()) : new TextEncoder().encode(argv[3])
|
|
100
96
|
return console.log(JSON.stringify(decode(bin), undefined, pretty ? 2 : undefined))
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
case 'diag2bin': {
|
|
104
|
-
// no coverage on windows for non-stdin input
|
|
105
|
-
/* c8 ignore next 1 */
|
|
106
100
|
const bin = fromDiag(process.argv.length < 4 ? (await fromStdin()).toString() : process.argv[3])
|
|
107
101
|
return process.stdout.write(bin)
|
|
108
102
|
}
|
|
109
103
|
|
|
110
104
|
case 'diag2hex': {
|
|
111
|
-
// no coverage on windows for non-stdin input
|
|
112
|
-
/* c8 ignore next 1 */
|
|
113
105
|
const bin = fromDiag(process.argv.length < 4 ? (await fromStdin()).toString() : process.argv[3])
|
|
114
106
|
return console.log(toHex(bin))
|
|
115
107
|
}
|
|
116
108
|
|
|
117
109
|
case 'diag2json': {
|
|
118
110
|
const { argv, pretty } = argvPretty()
|
|
119
|
-
// no coverage on windows for non-stdin input
|
|
120
|
-
/* c8 ignore next 1 */
|
|
121
111
|
const bin = fromDiag(argv.length < 4 ? (await fromStdin()).toString() : argv[3])
|
|
122
112
|
return console.log(JSON.stringify(decode(bin), undefined, pretty ? 2 : undefined))
|
|
123
113
|
}
|
|
@@ -180,7 +170,6 @@ async function run () {
|
|
|
180
170
|
}
|
|
181
171
|
|
|
182
172
|
run().catch((err) => {
|
|
183
|
-
/* c8 ignore next 2 */
|
|
184
173
|
console.error(err)
|
|
185
174
|
process.exit(1)
|
|
186
175
|
})
|
package/lib/bl.js
CHANGED
|
@@ -103,7 +103,6 @@ export class Bl {
|
|
|
103
103
|
if (this.chunks.length === 1) {
|
|
104
104
|
const chunk = this.chunks[0]
|
|
105
105
|
if (reset && this.cursor > chunk.length / 2) {
|
|
106
|
-
/* c8 ignore next 2 */
|
|
107
106
|
// @ts-ignore
|
|
108
107
|
byts = this.cursor === chunk.length ? chunk : chunk.subarray(0, this.cursor)
|
|
109
108
|
this._initReuseChunk = null
|
package/lib/byte-utils.js
CHANGED
|
@@ -26,7 +26,6 @@ function isBuffer (buf) {
|
|
|
26
26
|
* @returns {Uint8Array}
|
|
27
27
|
*/
|
|
28
28
|
export function asU8A (buf) {
|
|
29
|
-
/* c8 ignore next */
|
|
30
29
|
if (!(buf instanceof Uint8Array)) {
|
|
31
30
|
return Uint8Array.from(buf)
|
|
32
31
|
}
|
|
@@ -51,7 +50,6 @@ export const fromString = useBuffer
|
|
|
51
50
|
globalThis.Buffer.from(string)
|
|
52
51
|
: utf8ToBytes(string)
|
|
53
52
|
}
|
|
54
|
-
/* c8 ignore next 7 */
|
|
55
53
|
: // eslint-disable-line operator-linebreak
|
|
56
54
|
/**
|
|
57
55
|
* @param {string} string
|
|
@@ -83,7 +81,6 @@ export const slice = useBuffer
|
|
|
83
81
|
}
|
|
84
82
|
return bytes.slice(start, end)
|
|
85
83
|
}
|
|
86
|
-
/* c8 ignore next 9 */
|
|
87
84
|
: // eslint-disable-line operator-linebreak
|
|
88
85
|
/**
|
|
89
86
|
* @param {Uint8Array} bytes
|
|
@@ -103,18 +100,14 @@ export const concat = useBuffer
|
|
|
103
100
|
*/
|
|
104
101
|
(chunks, length) => {
|
|
105
102
|
// might get a stray plain Array here
|
|
106
|
-
/* c8 ignore next 1 */
|
|
107
103
|
chunks = chunks.map((c) => c instanceof Uint8Array
|
|
108
104
|
? c
|
|
109
|
-
// this case is occasionally missed during test runs so becomes coverage-flaky
|
|
110
|
-
/* c8 ignore next 4 */
|
|
111
105
|
: // eslint-disable-line operator-linebreak
|
|
112
106
|
// @ts-ignore
|
|
113
107
|
globalThis.Buffer.from(c))
|
|
114
108
|
// @ts-ignore
|
|
115
109
|
return asU8A(globalThis.Buffer.concat(chunks, length))
|
|
116
110
|
}
|
|
117
|
-
/* c8 ignore next 19 */
|
|
118
111
|
: // eslint-disable-line operator-linebreak
|
|
119
112
|
/**
|
|
120
113
|
* @param {Uint8Array[]} chunks
|
|
@@ -146,7 +139,6 @@ export const alloc = useBuffer
|
|
|
146
139
|
// @ts-ignore
|
|
147
140
|
return globalThis.Buffer.allocUnsafe(size)
|
|
148
141
|
}
|
|
149
|
-
/* c8 ignore next 8 */
|
|
150
142
|
: // eslint-disable-line operator-linebreak
|
|
151
143
|
/**
|
|
152
144
|
* @param {number} size
|
|
@@ -169,7 +161,6 @@ export const toHex = useBuffer
|
|
|
169
161
|
// @ts-ignore
|
|
170
162
|
return globalThis.Buffer.from(toBytes(d)).toString('hex')
|
|
171
163
|
}
|
|
172
|
-
/* c8 ignore next 12 */
|
|
173
164
|
: // eslint-disable-line operator-linebreak
|
|
174
165
|
/**
|
|
175
166
|
* @param {Uint8Array} d
|
|
@@ -196,7 +187,6 @@ export const fromHex = useBuffer
|
|
|
196
187
|
// @ts-ignore
|
|
197
188
|
return globalThis.Buffer.from(hex, 'hex')
|
|
198
189
|
}
|
|
199
|
-
/* c8 ignore next 17 */
|
|
200
190
|
: // eslint-disable-line operator-linebreak
|
|
201
191
|
/**
|
|
202
192
|
* @param {string|Uint8Array} hex
|
|
@@ -229,7 +219,6 @@ function toBytes (obj) {
|
|
|
229
219
|
if (ArrayBuffer.isView(obj)) {
|
|
230
220
|
return new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength)
|
|
231
221
|
}
|
|
232
|
-
/* c8 ignore next */
|
|
233
222
|
throw new Error('Unknown type, must be binary type')
|
|
234
223
|
}
|
|
235
224
|
|
|
@@ -239,7 +228,6 @@ function toBytes (obj) {
|
|
|
239
228
|
* @returns {number}
|
|
240
229
|
*/
|
|
241
230
|
export function compare (b1, b2) {
|
|
242
|
-
/* c8 ignore next 5 */
|
|
243
231
|
if (isBuffer(b1) && isBuffer(b2)) {
|
|
244
232
|
// probably not possible to get here in the current API
|
|
245
233
|
// @ts-ignore Buffer
|
|
@@ -250,7 +238,7 @@ export function compare (b1, b2) {
|
|
|
250
238
|
continue
|
|
251
239
|
}
|
|
252
240
|
return b1[i] < b2[i] ? -1 : 1
|
|
253
|
-
}
|
|
241
|
+
}
|
|
254
242
|
return 0
|
|
255
243
|
}
|
|
256
244
|
|
|
@@ -306,7 +294,6 @@ export function decodeCodePointsArray (codePoints) {
|
|
|
306
294
|
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
307
295
|
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
|
308
296
|
}
|
|
309
|
-
/* c8 ignore next 10 */
|
|
310
297
|
// Decode in chunks to avoid "call stack size exceeded".
|
|
311
298
|
let res = ''
|
|
312
299
|
let i = 0
|
package/lib/decode.js
CHANGED
|
@@ -44,7 +44,6 @@ class Tokeniser {
|
|
|
44
44
|
let token = quick[byt]
|
|
45
45
|
if (token === undefined) {
|
|
46
46
|
const decoder = jump[byt]
|
|
47
|
-
/* c8 ignore next 4 */
|
|
48
47
|
// if we're here then there's something wrong with our jump or quick lists!
|
|
49
48
|
if (!decoder) {
|
|
50
49
|
throw new Error(`${decodeErrPrefix} no decoder for major type ${byt >>> 5} (byte 0x${byt.toString(16).padStart(2, '0')})`)
|
|
@@ -260,7 +259,6 @@ function tokensToObject (tokeniser, options) {
|
|
|
260
259
|
}
|
|
261
260
|
throw new Error(`${decodeErrPrefix} tag not supported (${token.value})`)
|
|
262
261
|
}
|
|
263
|
-
/* c8 ignore next */
|
|
264
262
|
throw new Error('unsupported')
|
|
265
263
|
}
|
|
266
264
|
|
package/lib/diagnostic.js
CHANGED
|
@@ -62,7 +62,6 @@ function * tokensToDiagnostic (inp, width = 100) {
|
|
|
62
62
|
outp += ` ${slc(1, 1)}`
|
|
63
63
|
} else if (multilen < uintBoundaries[2]) {
|
|
64
64
|
outp += ` ${slc(1, 2)}`
|
|
65
|
-
/* c8 ignore next 5 */
|
|
66
65
|
} else if (multilen < uintBoundaries[3]) { // sus
|
|
67
66
|
outp += ` ${slc(1, 4)}`
|
|
68
67
|
} else if (multilen < uintBoundaries[4]) { // orly?
|
|
@@ -124,7 +123,6 @@ function * tokensToDiagnostic (inp, width = 100) {
|
|
|
124
123
|
indent.push(token.value)
|
|
125
124
|
break
|
|
126
125
|
// TODO: test tags .. somehow
|
|
127
|
-
/* c8 ignore next 5 */
|
|
128
126
|
case 'tag':
|
|
129
127
|
indent.push(1)
|
|
130
128
|
break
|
|
@@ -146,12 +144,10 @@ function * tokensToDiagnostic (inp, width = 100) {
|
|
|
146
144
|
* @returns {Uint8Array}
|
|
147
145
|
*/
|
|
148
146
|
function fromDiag (input) {
|
|
149
|
-
/* c8 ignore next 3 */
|
|
150
147
|
if (typeof input !== 'string') {
|
|
151
148
|
throw new TypeError('Expected string input')
|
|
152
149
|
}
|
|
153
150
|
input = input.replace(/#.*?$/mg, '').replace(/[\s\r\n]+/mg, '')
|
|
154
|
-
/* c8 ignore next 3 */
|
|
155
151
|
if (/[^a-f0-9]/i.test(input)) {
|
|
156
152
|
throw new TypeError('Input string was not CBOR diagnostic format')
|
|
157
153
|
}
|
package/lib/encode.js
CHANGED
|
@@ -415,7 +415,6 @@ function sortMapEntries (entries, options) {
|
|
|
415
415
|
function mapSorter (e1, e2) {
|
|
416
416
|
// the key position ([0]) could have a single token or an array
|
|
417
417
|
// almost always it'll be a single token but complex key might get involved
|
|
418
|
-
/* c8 ignore next 2 */
|
|
419
418
|
const keyToken1 = Array.isArray(e1[0]) ? e1[0][0] : e1[0]
|
|
420
419
|
const keyToken2 = Array.isArray(e2[0]) ? e2[0][0] : e2[0]
|
|
421
420
|
|
|
@@ -427,7 +426,6 @@ function mapSorter (e1, e2) {
|
|
|
427
426
|
const major = keyToken1.type.major
|
|
428
427
|
// TODO: handle case where cmp === 0 but there are more keyToken e. complex type)
|
|
429
428
|
const tcmp = cborEncoders[major].compareTokens(keyToken1, keyToken2)
|
|
430
|
-
/* c8 ignore next 5 */
|
|
431
429
|
if (tcmp === 0) {
|
|
432
430
|
// duplicate key or complex type where the first token matched,
|
|
433
431
|
// i.e. a map or array and we're only comparing the opening token
|
|
@@ -649,7 +647,6 @@ function encodeCustom (data, encoders, options, destination) {
|
|
|
649
647
|
writeTo = new Bl(size)
|
|
650
648
|
}
|
|
651
649
|
encoder(writeTo, tokens, options)
|
|
652
|
-
/* c8 ignore next 4 */
|
|
653
650
|
// this would be a problem with encodedSize() functions
|
|
654
651
|
if (writeTo.chunks.length !== 1) {
|
|
655
652
|
throw new Error(`Unexpected error: pre-calculated length for ${tokens} was wrong`)
|
package/lib/is.js
CHANGED
|
@@ -51,7 +51,6 @@ export function is (value) {
|
|
|
51
51
|
if (typeOf === 'string' || typeOf === 'number' || typeOf === 'bigint' || typeOf === 'symbol') {
|
|
52
52
|
return typeOf
|
|
53
53
|
}
|
|
54
|
-
/* c8 ignore next 3 */
|
|
55
54
|
if (typeOf === 'function') {
|
|
56
55
|
return 'Function'
|
|
57
56
|
}
|
|
@@ -70,7 +69,6 @@ export function is (value) {
|
|
|
70
69
|
if (objectType) {
|
|
71
70
|
return objectType
|
|
72
71
|
}
|
|
73
|
-
/* c8 ignore next */
|
|
74
72
|
return 'Object'
|
|
75
73
|
}
|
|
76
74
|
|
|
@@ -83,6 +81,5 @@ function getObjectType (value) {
|
|
|
83
81
|
if (objectTypeNames.includes(objectTypeName)) {
|
|
84
82
|
return objectTypeName
|
|
85
83
|
}
|
|
86
|
-
/* c8 ignore next */
|
|
87
84
|
return undefined
|
|
88
85
|
}
|
package/lib/json/decode.js
CHANGED
|
@@ -141,7 +141,6 @@ class Tokenizer {
|
|
|
141
141
|
* @returns {Token}
|
|
142
142
|
*/
|
|
143
143
|
parseString () {
|
|
144
|
-
/* c8 ignore next 4 */
|
|
145
144
|
if (this.ch() !== 34) { // '"'
|
|
146
145
|
// this would be a programming error
|
|
147
146
|
throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}; this shouldn't happen`)
|
|
@@ -192,7 +191,6 @@ class Tokenizer {
|
|
|
192
191
|
const readUtf8Char = () => {
|
|
193
192
|
const firstByte = this.ch()
|
|
194
193
|
let codePoint = null
|
|
195
|
-
/* c8 ignore next 1 */
|
|
196
194
|
let bytesPerSequence = (firstByte > 0xef) ? 4 : (firstByte > 0xdf) ? 3 : (firstByte > 0xbf) ? 2 : 1
|
|
197
195
|
|
|
198
196
|
if (this._pos + bytesPerSequence > this.data.length) {
|
|
@@ -202,7 +200,6 @@ class Tokenizer {
|
|
|
202
200
|
let secondByte, thirdByte, fourthByte, tempCodePoint
|
|
203
201
|
|
|
204
202
|
switch (bytesPerSequence) {
|
|
205
|
-
/* c8 ignore next 6 */
|
|
206
203
|
// this case is dealt with by the caller function
|
|
207
204
|
case 1:
|
|
208
205
|
if (firstByte < 0x80) {
|
|
@@ -223,7 +220,6 @@ class Tokenizer {
|
|
|
223
220
|
thirdByte = this.data[this._pos + 2]
|
|
224
221
|
if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80) {
|
|
225
222
|
tempCodePoint = (firstByte & 0xf) << 0xc | (secondByte & 0x3f) << 0x6 | (thirdByte & 0x3f)
|
|
226
|
-
/* c8 ignore next 3 */
|
|
227
223
|
if (tempCodePoint > 0x7ff && (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)) {
|
|
228
224
|
codePoint = tempCodePoint
|
|
229
225
|
}
|
|
@@ -241,7 +237,6 @@ class Tokenizer {
|
|
|
241
237
|
}
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
/* c8 ignore next 5 */
|
|
245
240
|
if (codePoint === null) {
|
|
246
241
|
// we did not generate a valid codePoint so insert a
|
|
247
242
|
// replacement char (U+FFFD) and advance only 1 byte
|
|
@@ -430,7 +425,6 @@ class Tokenizer {
|
|
|
430
425
|
this.skipWhitespace()
|
|
431
426
|
return this.parseValue()
|
|
432
427
|
}
|
|
433
|
-
/* c8 ignore next 2 */
|
|
434
428
|
default:
|
|
435
429
|
throw new Error(`${decodeErrPrefix} unexpected parse state at position ${this._pos}; this shouldn't happen`)
|
|
436
430
|
}
|
package/lib/json/encode.js
CHANGED
|
@@ -123,13 +123,11 @@ class JSONEncoder extends Array {
|
|
|
123
123
|
buf.push([93]) // ']'
|
|
124
124
|
} else if (Type.equals(recurs.type, Type.map)) {
|
|
125
125
|
buf.push([125]) // '}'
|
|
126
|
-
/* c8 ignore next 3 */
|
|
127
126
|
} else {
|
|
128
127
|
throw new Error('Unexpected recursive type; this should not happen!')
|
|
129
128
|
}
|
|
130
129
|
return
|
|
131
130
|
}
|
|
132
|
-
/* c8 ignore next 2 */
|
|
133
131
|
throw new Error('Unexpected break; this should not happen!')
|
|
134
132
|
}
|
|
135
133
|
if (token.value === undefined) {
|
|
@@ -181,7 +179,6 @@ class JSONEncoder extends Array {
|
|
|
181
179
|
// // last char was a lead
|
|
182
180
|
// if (!leadSurrogate) {
|
|
183
181
|
// // no lead yet
|
|
184
|
-
// /* c8 ignore next 9 */
|
|
185
182
|
// if (codePoint > 0xdbff) {
|
|
186
183
|
// // unexpected trail
|
|
187
184
|
// byts.push(0xef, 0xbf, 0xbd)
|
|
@@ -199,7 +196,6 @@ class JSONEncoder extends Array {
|
|
|
199
196
|
// }
|
|
200
197
|
|
|
201
198
|
// // 2 leads in a row
|
|
202
|
-
// /* c8 ignore next 5 */
|
|
203
199
|
// if (codePoint < 0xdc00) {
|
|
204
200
|
// byts.push(0xef, 0xbf, 0xbd)
|
|
205
201
|
// leadSurrogate = codePoint
|
|
@@ -208,7 +204,6 @@ class JSONEncoder extends Array {
|
|
|
208
204
|
|
|
209
205
|
// // valid surrogate pair
|
|
210
206
|
// codePoint = (leadSurrogate - 0xd800 << 10 | codePoint - 0xdc00) + 0x10000
|
|
211
|
-
// /* c8 ignore next 4 */
|
|
212
207
|
// } else if (leadSurrogate) {
|
|
213
208
|
// // valid bmp char, but last char was a lead
|
|
214
209
|
// byts.push(0xef, 0xbf, 0xbd)
|
|
@@ -245,19 +240,16 @@ class JSONEncoder extends Array {
|
|
|
245
240
|
|
|
246
241
|
// byts.push(codePoint)
|
|
247
242
|
// } else if (codePoint < 0x800) {
|
|
248
|
-
// /* c8 ignore next 1 */
|
|
249
243
|
// byts.push(
|
|
250
244
|
// codePoint >> 0x6 | 0xc0,
|
|
251
245
|
// codePoint & 0x3f | 0x80
|
|
252
246
|
// )
|
|
253
247
|
// } else if (codePoint < 0x10000) {
|
|
254
|
-
// /* c8 ignore next 1 */
|
|
255
248
|
// byts.push(
|
|
256
249
|
// codePoint >> 0xc | 0xe0,
|
|
257
250
|
// codePoint >> 0x6 & 0x3f | 0x80,
|
|
258
251
|
// codePoint & 0x3f | 0x80
|
|
259
252
|
// )
|
|
260
|
-
// /* c8 ignore next 9 */
|
|
261
253
|
// } else if (codePoint < 0x110000) {
|
|
262
254
|
// byts.push(
|
|
263
255
|
// codePoint >> 0x12 | 0xf0,
|
|
@@ -266,7 +258,6 @@ class JSONEncoder extends Array {
|
|
|
266
258
|
// codePoint & 0x3f | 0x80
|
|
267
259
|
// )
|
|
268
260
|
// } else {
|
|
269
|
-
// /* c8 ignore next 2 */
|
|
270
261
|
// throw new Error('Invalid code point')
|
|
271
262
|
// }
|
|
272
263
|
// }
|
|
@@ -292,7 +283,6 @@ function mapSorter (e1, e2) {
|
|
|
292
283
|
if (keyToken1 > keyToken2) {
|
|
293
284
|
return 1
|
|
294
285
|
}
|
|
295
|
-
/* c8 ignore next 1 */
|
|
296
286
|
throw new Error(`${encodeErrPrefix} unexpected duplicate map keys, this is not supported`)
|
|
297
287
|
}
|
|
298
288
|
|
package/lib/jump.js
CHANGED
|
@@ -186,14 +186,12 @@ export function quickEncodeToken (token) {
|
|
|
186
186
|
if (token.value === 0) {
|
|
187
187
|
return fromArray([0x80])
|
|
188
188
|
}
|
|
189
|
-
/* c8 ignore next 2 */
|
|
190
189
|
// shouldn't be possible if this were called when there was only one token
|
|
191
190
|
return
|
|
192
191
|
case Type.map:
|
|
193
192
|
if (token.value === 0) {
|
|
194
193
|
return fromArray([0xa0])
|
|
195
194
|
}
|
|
196
|
-
/* c8 ignore next 2 */
|
|
197
195
|
// shouldn't be possible if this were called when there was only one token
|
|
198
196
|
return
|
|
199
197
|
case Type.uint:
|
package/lib/length.js
CHANGED
|
@@ -52,7 +52,6 @@ export function tokensToLength (tokens, encoders = cborEncoders, options = defau
|
|
|
52
52
|
return len
|
|
53
53
|
} else {
|
|
54
54
|
const encoder = encoders[tokens.type.major]
|
|
55
|
-
/* c8 ignore next 3 */
|
|
56
55
|
if (encoder.encodedSize === undefined || typeof encoder.encodedSize !== 'function') {
|
|
57
56
|
throw new Error(`Encoder for ${tokens.type.name} does not have an encodedSize()`)
|
|
58
57
|
}
|
package/lib/token.js
CHANGED
|
@@ -11,7 +11,6 @@ class Type {
|
|
|
11
11
|
this.terminal = terminal
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
/* c8 ignore next 3 */
|
|
15
14
|
toString () {
|
|
16
15
|
return `Type[${this.major}].${this.name}`
|
|
17
16
|
}
|
|
@@ -21,7 +20,6 @@ class Type {
|
|
|
21
20
|
* @returns {number}
|
|
22
21
|
*/
|
|
23
22
|
compare (typ) {
|
|
24
|
-
/* c8 ignore next 1 */
|
|
25
23
|
return this.major < typ.major ? -1 : this.major > typ.major ? 1 : 0
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -70,7 +68,6 @@ class Token {
|
|
|
70
68
|
this.byteValue = undefined
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
/* c8 ignore next 3 */
|
|
74
71
|
toString () {
|
|
75
72
|
return `Token[${this.type}].${this.value}`
|
|
76
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cborg",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"description": "Fast CBOR with a focus on strictness",
|
|
5
5
|
"main": "cborg.js",
|
|
6
6
|
"type": "module",
|
|
@@ -12,12 +12,11 @@
|
|
|
12
12
|
"build": "npm run build:types",
|
|
13
13
|
"build:types": "tsc --build",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"test:node": "
|
|
15
|
+
"test:node": "mocha test/test-*.js",
|
|
16
16
|
"test:node-bin": "mocha test/node-test-bin.js",
|
|
17
17
|
"test:browser": "polendina --cleanup test/test-*.js",
|
|
18
18
|
"test": "npm run lint && npm run build && npm run test:node && npm run test:node-bin && npm run test:browser",
|
|
19
|
-
"test:ci": "npm run test"
|
|
20
|
-
"coverage": "c8 --reporter=html --reporter=text mocha test/test-*.js && npx st -d coverage -p 8888"
|
|
19
|
+
"test:ci": "npm run test"
|
|
21
20
|
},
|
|
22
21
|
"repository": {
|
|
23
22
|
"type": "git",
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
"@types/chai": "^5.2.3",
|
|
39
38
|
"@types/mocha": "^10.0.10",
|
|
40
39
|
"@types/node": "^25.5.0",
|
|
41
|
-
"c8": "^11.0.0",
|
|
42
40
|
"chai": "^6.2.2",
|
|
43
41
|
"conventional-changelog-conventionalcommits": "^9.3.0",
|
|
44
42
|
"ipld-garbage": "^5.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1negint.d.ts","sourceRoot":"","sources":["../../lib/1negint.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;GAMG;AACH,oCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAED;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAED;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAKD;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAcjB;AAED;;;GAGG;AACH,qCAHW,UAAU,SACV,KAAK,QAMf;;IAED;;;OAGG;IACH,4BAHW,KAAK,GACH,MAAM,
|
|
1
|
+
{"version":3,"file":"1negint.d.ts","sourceRoot":"","sources":["../../lib/1negint.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;GAMG;AACH,oCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAED;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAED;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAIjB;AAKD;;;;;;GAMG;AACH,qCANW,UAAU,OACV,MAAM,UACN,MAAM,WACN,aAAa,GACX,KAAK,CAcjB;AAED;;;GAGG;AACH,qCAHW,UAAU,SACV,KAAK,QAMf;;IAED;;;OAGG;IACH,4BAHW,KAAK,GACH,MAAM,CAmBlB;IAED;;;;OAIG;IACH,6BAJW,KAAK,QACL,KAAK,GACH,MAAM,CAKlB;;yBAtGY,OAAO,iBAAiB,EAAE,UAAU;4BACpC,OAAO,iBAAiB,EAAE,aAAa;sBANxB,YAAY"}
|
package/types/lib/bl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl.d.ts","sourceRoot":"","sources":["../../lib/bl.js"],"names":[],"mappings":"AA0BA;IACE;;OAEG;IACH,wBAFW,MAAM,EAahB;IAVC,kBAA0B;IAC1B,qBAAqB;IACrB,QADW,MAAM,CACF;IACf,qBAAqB;IACrB,WADW,MAAM,CACE;IACnB,sCAAsC;IACtC,QADW,CAAC,UAAU,GAAC,MAAM,EAAE,CAAC,EAAE,CAClB;IAEhB,uCAAuC;IACvC,iBADW,UAAU,GAAC,MAAM,EAAE,GAAC,IAAI,CACR;IAG7B,cAUC;IAED;;OAEG;IACH,YAFW,UAAU,GAAC,MAAM,EAAE,QAsC7B;IAED;;;OAGG;IACH,gBAHW,OAAO,GACL,UAAU,
|
|
1
|
+
{"version":3,"file":"bl.d.ts","sourceRoot":"","sources":["../../lib/bl.js"],"names":[],"mappings":"AA0BA;IACE;;OAEG;IACH,wBAFW,MAAM,EAahB;IAVC,kBAA0B;IAC1B,qBAAqB;IACrB,QADW,MAAM,CACF;IACf,qBAAqB;IACrB,WADW,MAAM,CACE;IACnB,sCAAsC;IACtC,QADW,CAAC,UAAU,GAAC,MAAM,EAAE,CAAC,EAAE,CAClB;IAEhB,uCAAuC;IACvC,iBADW,UAAU,GAAC,MAAM,EAAE,GAAC,IAAI,CACR;IAG7B,cAUC;IAED;;OAEG;IACH,YAFW,UAAU,GAAC,MAAM,EAAE,QAsC7B;IAED;;;OAGG;IACH,gBAHW,OAAO,GACL,UAAU,CAuBtB;CACF;AAED;;;GAGG;AACH;IACE;;OAEG;IACH,kBAFW,UAAU,EAUpB;IAPC,kCAAgB;IAChB,qBAAqB;IACrB,QADW,MAAM,CACF;IAGf,2BAA2B;IAC3B,QADW,UAAU,EAAE,CACH;IAGtB,cAEC;IAED;;OAEG;IACH,YAFW,UAAU,GAAC,MAAM,EAAE,QAQ7B;IAED;;;OAGG;IACH,gBAHW,OAAO,GACL,UAAU,CAQtB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byte-utils.d.ts","sourceRoot":"","sources":["../../lib/byte-utils.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,2BAHW,UAAU,GAAC,MAAM,EAAE,GACjB,UAAU,
|
|
1
|
+
{"version":3,"file":"byte-utils.d.ts","sourceRoot":"","sources":["../../lib/byte-utils.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,2BAHW,UAAU,GAAC,MAAM,EAAE,GACjB,UAAU,CAOtB;AAgMD;;;;GAIG;AACH,4BAJW,UAAU,MACV,UAAU,GACR,MAAM,CAelB;AA6CD;;;GAGG;AACH,kDAHW,MAAM,EAAE,GACN,MAAM,CAiBlB;AA9SD,4BAMkD;AAgC9C;;GAEG;AACH,mCAFW,MAAM,OAQhB;AAcE,+BAHI,MAAM,EAAE,GACN,UAAU,CAItB;AAIG;;;;GAIG;AAEH,6BALW,UAAU,SACV,MAAM,OACN,MAAM,2BAQhB;AAaD;;;;GAIG;AACH,+BAJW,UAAU,EAAE,UACZ,MAAM,GACJ,UAAU,CAWtB;AAuBD;;;GAGG;AACH,4BAHW,MAAM,GACJ,UAAU,CAMtB;AAYD;;;GAGG;AACH,yBAHW,UAAU,GACR,MAAM,CAQlB;AAgBH;;;GAGG;AACD,6BAHS,MAAM,GAAC,UAAU,GACf,UAAU,CAQpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../lib/decode.js"],"names":[],"mappings":"oBAMa,OAAO,YAAY,EAAE,KAAK;4BAC1B,OAAO,iBAAiB,EAAE,aAAa;8BACvC,OAAO,iBAAiB,EAAE,eAAe;+BACzC,OAAO,iBAAiB,EAAE,gBAAgB;AAUvD;;GAEG;AACH,kCAFgB,eAAe;IAG7B;;;OAGG;IACH,kBAHW,UAAU,YACV,aAAa,EAMvB;IAHC,aAAa;IACb,kCAAgB;IAChB,iDAAsB;IAGxB,cAEC;IAED,gBAEC;IAED,
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../lib/decode.js"],"names":[],"mappings":"oBAMa,OAAO,YAAY,EAAE,KAAK;4BAC1B,OAAO,iBAAiB,EAAE,aAAa;8BACvC,OAAO,iBAAiB,EAAE,eAAe;+BACzC,OAAO,iBAAiB,EAAE,gBAAgB;AAUvD;;GAEG;AACH,kCAFgB,eAAe;IAG7B;;;OAGG;IACH,kBAHW,UAAU,YACV,aAAa,EAMvB;IAHC,aAAa;IACb,kCAAgB;IAChB,iDAAsB;IAGxB,cAEC;IAED,gBAEC;IAED,mCAeC;CACF;AAmKD;;;;GAIG;AACH,0CAJW,eAAe,WACf,aAAa,GACX,GAAG,6BAAW,CAuC1B;AAyBD;;;;GAIG;AACH,6BAJW,UAAU,YACV,aAAa,GACX,GAAG,CAQf;AAlCD;;;;GAIG;AACH,kCAJW,UAAU,YACV,aAAa,GACX,CAAC,GAAG,EAAE,UAAU,CAAC,CAkB7B;AAjOD,mCAAiC;AADjC,kCAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.d.ts","sourceRoot":"","sources":["../../lib/diagnostic.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wCAHW,UAAU,UACV,MAAM,
|
|
1
|
+
{"version":3,"file":"diagnostic.d.ts","sourceRoot":"","sources":["../../lib/diagnostic.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wCAHW,UAAU,UACV,MAAM,oCAiIhB;AAED;;;;GAIG;AACH,gCAHW,MAAM,GACJ,UAAU,CAWtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../lib/encode.js"],"names":[],"mappings":"AAwCA,oCAAoC;AACpC,oCADc,gBAAgB,EAAE,CAY/B;AAnBD,4BAA4B;AAC5B,mCADW,aAAa,CAKtB;
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../lib/encode.js"],"names":[],"mappings":"AAwCA,oCAAoC;AACpC,oCADc,gBAAgB,EAAE,CAY/B;AAnBD,4BAA4B;AAC5B,mCADW,aAAa,CAKtB;sBA+YW,KAAK,GAAG;IAAE,SAAS,CAAC,EAAE,UAAU,CAAA;CAAE;4BApalC,OAAO,iBAAiB,EAAE,aAAa;kCACvC,OAAO,iBAAiB,EAAE,mBAAmB;wBAC7C,OAAO,iBAAiB,EAAE,SAAS;gCACnC,OAAO,iBAAiB,EAAE,iBAAiB;+BAC3C,OAAO,iBAAiB,EAAE,gBAAgB;kCAC1C,OAAO,iBAAiB,EAAE,mBAAmB;yBAC7C,OAAO,iBAAiB,EAAE,UAAU;AA4SjD;;;;;GAKG;AACH,oCALW,GAAG,YACH,aAAa,aACb,SAAS,GACP,mBAAmB,CAgB/B;AA8TD;;;;GAIG;AACH,6BAJW,GAAG,YACH,aAAa,GACX,UAAU,CAatB;AA1DD;;;;;;GAMG;AACH,mCANW,GAAG,YACH,gBAAgB,EAAE,WAClB,aAAa,gBACb,UAAU,GACR,UAAU,CAmCtB;AAoBD;;;;;GAKG;AACH,iCALW,GAAG,eACH,UAAU,YACV,aAAa,GACX;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAc/B;AA/nBD,8BAA8B;AAC9B,4BADiB,SAAS;IA0BxB;;;;OAIG;IACH,0BAJW,SAAS,GAAC,SAAS,OACnB,MAAM,GAAC,GAAG,EAAE,GACV,SAAS,CAOrB;IAlCD;;;OAGG;IACH,iBAHW,MAAM,GAAC,GAAG,EAAE,UACZ,SAAS,GAAC,SAAS,EAK7B;IAFC,oBAAc;IACd,wDAAoB;IAGtB;;;OAGG;IACH,cAHW,MAAM,GAAC,GAAG,EAAE,GACV,OAAO,CAWnB;CAaF;sBA9F2B,YAAY"}
|
package/types/lib/is.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../lib/is.js"],"names":[],"mappings":"AAmCA;;;GAGG;AACH,0BAHW,GAAG,GACD,MAAM,
|
|
1
|
+
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../lib/is.js"],"names":[],"mappings":"AAmCA;;;GAGG;AACH,0BAHW,GAAG,GACD,MAAM,CAmClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../lib/json/decode.js"],"names":[],"mappings":"4BAMa,OAAO,oBAAoB,EAAE,aAAa;8BAC1C,OAAO,oBAAoB,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../lib/json/decode.js"],"names":[],"mappings":"4BAMa,OAAO,oBAAoB,EAAE,aAAa;8BAC1C,OAAO,oBAAoB,EAAE,eAAe;AA0azD;;;;GAIG;AACH,6BAJW,UAAU,YACV,aAAa,GACX,GAAG,CAKf;AAED;;;;GAIG;AACH,kCAJW,UAAU,YACV,aAAa,GACX,CAAC,GAAG,EAAE,UAAU,CAAC,CAK7B;AA9bD;;;GAGG;AAEH;;GAEG;AACH,kCAFgB,eAAe;IAG7B;;;OAGG;IACH,kBAHW,UAAU,YACV,aAAa,EASvB;IANC,aAAa;IACb,kCAAgB;IAChB,oDAAsB;IACtB,uBAAuB;IACvB,WADW,MAAM,EAAE,CACO;IAC1B,kBAAmB;IAGrB,cAEC;IAED;;OAEG;IACH,QAFa,OAAO,CAInB;IAED;;OAEG;IACH,MAFa,MAAM,CAIlB;IAED;;OAEG;IACH,eAFa,MAAM,CAIlB;IAED,uBAMC;IAED;;OAEG;IACH,YAFW,MAAM,EAAE,QAWlB;IAED,qBA+DC;IAED;;OAEG;IACH,eAFa,KAAK,CA6KjB;IAED;;OAEG;IACH,cAFa,KAAK,CAuCjB;IAED;;OAEG;IACH,QAFa,KAAK,CAwEjB;CACF;sBA9a2B,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../lib/json/encode.js"],"names":[],"mappings":"4BAMa,OAAO,oBAAoB,EAAE,aAAa;yBAC1C,OAAO,oBAAoB,EAAE,UAAU;oBACvC,OAAO,aAAa,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../lib/json/encode.js"],"names":[],"mappings":"4BAMa,OAAO,oBAAoB,EAAE,aAAa;yBAC1C,OAAO,oBAAoB,EAAE,UAAU;oBACvC,OAAO,aAAa,EAAE,KAAK;AA0RxC;;;;GAIG;AACH,6BAJW,GAAG,YACH,aAAa,GACX,UAAU,CAMtB"}
|
package/types/lib/jump.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump.d.ts","sourceRoot":"","sources":["../../lib/jump.js"],"names":[],"mappings":"AAkKA;;;GAGG;AACH,wCAHW,KAAK,GACH,UAAU,GAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"jump.d.ts","sourceRoot":"","sources":["../../lib/jump.js"],"names":[],"mappings":"AAkKA;;;GAGG;AACH,wCAHW,KAAK,GACH,UAAU,GAAC,SAAS,CA0ChC;AA7KD,6FAA6F;AAC7F,mBADW,CAAC,CAAC,IAAI,EAAC,UAAU,EAAE,GAAG,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,OAAO,CAAC,EAAC,aAAa,KAAK,GAAG,CAAC,EAAE,CACnE;AAuGtB,sBAAsB;AACtB,oBADW,KAAK,EAAE,CACK;4BA7HV,OAAO,iBAAiB,EAAE,aAAa;sBAbxB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../lib/length.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;GAUG;AACH,oCAJW,GAAG,YACH,aAAa,GACX,MAAM,CAOlB;AAED;;;;;;;;;GASG;AACH,uCAJW,mBAAmB,aACnB,gBAAgB,EAAE,YAClB,aAAa,
|
|
1
|
+
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../lib/length.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;GAUG;AACH,oCAJW,GAAG,YACH,aAAa,GACX,MAAM,CAOlB;AAED;;;;;;;;;GASG;AACH,uCAJW,mBAAmB,aACnB,gBAAgB,EAAE,YAClB,aAAa,UAgBvB;4BAvDY,OAAO,iBAAiB,EAAE,aAAa;+BACvC,OAAO,iBAAiB,EAAE,gBAAgB;kCAC1C,OAAO,iBAAiB,EAAE,mBAAmB"}
|
package/types/lib/token.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../lib/token.js"],"names":[],"mappings":"AAAA;
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../lib/token.js"],"names":[],"mappings":"AAAA;IAyBE;;;;;;;OAOG;IACH,iBAJW,IAAI,KACJ,IAAI,GACF,OAAO,CAInB;IAlCD;;;;OAIG;IACH,mBAJW,MAAM,QACN,MAAM,YACN,OAAO,EAOjB;IAJC,cAAkB;IAClB,qBAA8B;IAC9B,aAAgB;IAChB,kBAAwB;IAG1B,mBAEC;IAED;;;OAGG;IACH,aAHW,IAAI,GACF,MAAM,CAIlB;CAaF;;;;;;;;;;;;;;;;;;;;AAkBD;IACE;;;;OAIG;IACH,kBAJW,IAAI,UACJ,GAAG,kBACH,MAAM,EAUhB;IAPC,WAAgB;IAChB,WAAkB;IAClB,kCAAkC;IAClC,mCAAmC;IACnC,cADW,UAAU,GAAC,SAAS,CACF;IAC7B,mCAAmC;IACnC,WADW,UAAU,GAAC,SAAS,CACL;IAG5B,mBAEC;CACF"}
|