+2
-2
@@ -117,3 +117,3 @@ 'use strict'; | ||
| * | ||
| * @returns {IterableIterator<any>} Key value pairs. | ||
| * @returns {MapIterator<any>} Key value pairs. | ||
| * @yields {any[]} Key value pairs. | ||
@@ -131,3 +131,3 @@ */ | ||
| * | ||
| * @returns {IterableIterator<any>} Key value pairs. | ||
| * @returns {MapIterator<any>} Key value pairs. | ||
| */ | ||
@@ -134,0 +134,0 @@ [Symbol.iterator]() { |
+2
-2
| { | ||
| "name": "cbor", | ||
| "version": "10.0.3", | ||
| "version": "10.0.9", | ||
| "description": "Encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC8949).", | ||
@@ -45,4 +45,4 @@ "main": "./lib/cbor.js", | ||
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=20" | ||
| } | ||
| } |
+3
-3
@@ -33,6 +33,6 @@ # cbor | ||
| **NOTE** | ||
| If you are going to use this on the web, use [cbor-web](../cbor-web) instead. | ||
| If you are going to use this on the web, use [cbor-web](../cbor-web/) instead. | ||
| If you need support for encoding and decoding BigDecimal fractions (tag 4) or | ||
| BigFloats (tag 5), please see [cbor-bigdecimal](../cbor-bigdecimal). | ||
| BigFloats (tag 5), please see [cbor-bigdecimal](../cbor-bigdecimal/). | ||
@@ -43,3 +43,3 @@ ## Documentation: | ||
| For a command-line interface, see [cbor-cli](../cbor-cli). | ||
| For a command-line interface, see [cbor-cli](../cbor-cli/). | ||
@@ -46,0 +46,0 @@ Example: |
@@ -19,3 +19,2 @@ export = Commented; | ||
| * @throws {Error} Input required. | ||
| * @static | ||
| */ | ||
@@ -49,7 +48,7 @@ static comment(input: string | Buffer | ArrayBuffer | Uint8Array | Uint8ClampedArray | DataView | stream.Readable, options?: CommentOptions | commentCallback | string | number, cb?: commentCallback): Promise<any>; | ||
| */ | ||
| _on_more(mt: any, len: any, parent_mt: any, pos: any): void; | ||
| _on_more(mt: any, len: any, _parent_mt: any, _pos: any): void; | ||
| /** | ||
| * @ignore | ||
| */ | ||
| _on_start_string(mt: any, len: any, parent_mt: any, pos: any): void; | ||
| _on_start_string(mt: any, len: any, _parent_mt: any, _pos: any): void; | ||
| /** | ||
@@ -62,3 +61,3 @@ * @ignore | ||
| */ | ||
| _on_stop(mt: any): void; | ||
| _on_stop(_mt: any): void; | ||
| /** | ||
@@ -65,0 +64,0 @@ * @private |
@@ -38,3 +38,2 @@ export = Decoder; | ||
| * @throws {Error} Insufficient data. | ||
| * @static | ||
| */ | ||
@@ -53,3 +52,2 @@ static decodeFirstSync(input: BufferLike, options?: DecoderOptions | string): ExtendedResults | any; | ||
| * @throws {Error} Insufficient data provided. | ||
| * @static | ||
| */ | ||
@@ -71,3 +69,2 @@ static decodeAllSync(input: BufferLike, options?: DecoderOptions | string): Array<ExtendedResults> | Array<any>; | ||
| * @throws {TypeError} No input provided. | ||
| * @static | ||
| */ | ||
@@ -92,3 +89,2 @@ static decodeFirst(input: BufferLike, options?: DecoderOptions | decodeCallback | string, cb?: decodeCallback): Promise<ExtendedResults | any>; | ||
| * @throws {TypeError} No input specified. | ||
| * @static | ||
| */ | ||
@@ -95,0 +91,0 @@ static decodeAll(input: BufferLike, options?: DecoderOptions | ((error: Error, value: Array<ExtendedResults> | Array<any>) => any) | string, cb?: (error: Error, value: Array<ExtendedResults> | Array<any>) => any): Promise<Array<ExtendedResults> | Array<any>>; |
@@ -54,3 +54,3 @@ export = Diagnose; | ||
| */ | ||
| type BufferLike = string | Buffer | ArrayBuffer | Uint8Array | Uint8ClampedArray | DataView | stream.Readable; | ||
| type BufferLike = string | Buffer | ArrayBuffer | ArrayBufferView | DataView | stream.Readable; | ||
| type DiagnoseOptions = { | ||
@@ -57,0 +57,0 @@ /** |
@@ -182,3 +182,2 @@ export = Encoder; | ||
| * @returns {Buffer} The encoded objects. | ||
| * @static | ||
| */ | ||
@@ -198,5 +197,3 @@ static encodeOne(obj: any, options?: EncodingOptions): Buffer; | ||
| static encodeAsync(obj: any, options?: EncodingOptions): Promise<Buffer>; | ||
| static set SEMANTIC_TYPES(val: { | ||
| [x: string]: EncodeFunction; | ||
| }); | ||
| static set SEMANTIC_TYPES(val: SemanticMap); | ||
| /** | ||
@@ -207,5 +204,3 @@ * The currently supported set of semantic types. May be modified by plugins. | ||
| */ | ||
| static get SEMANTIC_TYPES(): { | ||
| [x: string]: EncodeFunction; | ||
| }; | ||
| static get SEMANTIC_TYPES(): SemanticMap; | ||
| /** | ||
@@ -334,7 +329,7 @@ * Reset the supported semantic types to the original set, before any | ||
| /** | ||
| * @param {null} obj Ignored. | ||
| * @param {null} _obj Ignored. | ||
| * @returns {boolean} True on success. | ||
| * @ignore | ||
| */ | ||
| _pushNull(obj: null): boolean; | ||
| _pushNull(_obj: null): boolean; | ||
| /** | ||
@@ -341,0 +336,0 @@ * @param {number} tag Tag number to encode. |
@@ -49,6 +49,6 @@ export = CborMap; | ||
| * | ||
| * @returns {IterableIterator<any>} Key value pairs. | ||
| * @returns {MapIterator<any>} Key value pairs. | ||
| * @yields {any[]} Key value pairs. | ||
| */ | ||
| entries(): IterableIterator<any>; | ||
| entries(): MapIterator<any>; | ||
| /** | ||
@@ -76,5 +76,5 @@ * Executes a provided function once per each key/value pair in the Map | ||
| * | ||
| * @returns {IterableIterator<any>} Key value pairs. | ||
| * @returns {MapIterator<any>} Key value pairs. | ||
| */ | ||
| [Symbol.iterator](): IterableIterator<any>; | ||
| [Symbol.iterator](): MapIterator<any>; | ||
| } |
@@ -8,5 +8,3 @@ export = Tagged; | ||
| declare class Tagged { | ||
| static set TAGS(val: { | ||
| [x: string]: TagFunction; | ||
| }); | ||
| static set TAGS(val: TagMap); | ||
| /** | ||
@@ -18,5 +16,3 @@ * The current set of supported tags. May be modified by plugins. | ||
| */ | ||
| static get TAGS(): { | ||
| [x: string]: TagFunction; | ||
| }; | ||
| static get TAGS(): TagMap; | ||
| /** | ||
@@ -23,0 +19,0 @@ * Reset the supported tags to the original set, before any plugins modified |
@@ -6,3 +6,3 @@ export function utf8(buf: any): string; | ||
| export function isBufferish(b: any): boolean; | ||
| export function bufferishToBuffer(b: any): Buffer; | ||
| export function bufferishToBuffer(b: any): Buffer<ArrayBuffer>; | ||
| export function parseCBORint(ai: any, buf: any): any; | ||
@@ -12,4 +12,4 @@ export function writeHalf(buf: any, half: any): boolean; | ||
| export function parseCBORfloat(buf: any): any; | ||
| export function hex(s: any): Buffer; | ||
| export function bin(s: any): Buffer; | ||
| export function hex(s: any): Buffer<ArrayBuffer>; | ||
| export function bin(s: any): Buffer<ArrayBuffer>; | ||
| export function arrayEqual(a: any, b: any): any; | ||
@@ -16,0 +16,0 @@ export function bufferToBigInt(buf: any): bigint; |
@@ -31,5 +31,5 @@ export = BinaryParseStream; | ||
| __restart(): void; | ||
| __parser: Generator<number, any, Buffer>; | ||
| __parser: Generator<number, any, Buffer<ArrayBufferLike>>; | ||
| } | ||
| import stream = require("stream"); | ||
| import NoFilter = require("nofilter"); |
166609
-0.12%4924
-0.28%