arraybuffer-xml-parser
Advanced tools
Comparing version 0.5.1 to 0.6.0
export * from './parse'; | ||
export * from './parseStream'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './parse'; | ||
export * from './parseStream'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* Search for the corresponding closing tag '>' | ||
* @param data | ||
* @param i | ||
* @returns | ||
*/ | ||
export declare function closingIndexForOpeningTag(data: Uint8Array, i: number): { | ||
@@ -2,0 +8,0 @@ data: string; |
import { decoder } from './utils/utf8Decoder'; | ||
/** | ||
* Search for the corresponding closing tag '>' | ||
* @param data | ||
* @param i | ||
* @returns | ||
*/ | ||
export function closingIndexForOpeningTag(data, i) { | ||
@@ -25,7 +31,4 @@ let attrBoundary; | ||
} | ||
return { | ||
data: decoder.decode(data.subarray(i, i + endIndex)), | ||
index: 0, | ||
}; | ||
throw new Error('Could not find closing tag'); | ||
} | ||
//# sourceMappingURL=closingIndexForOpeningTag.js.map |
@@ -5,2 +5,14 @@ import { XMLNode } from '../XMLNode'; | ||
}; | ||
export interface StreamParseOptions extends ParseOptions { | ||
/** | ||
* What is the maximal size (in bytes) of an entry | ||
* @default 1e7 | ||
*/ | ||
maxEntrySize?: number; | ||
/** | ||
* What is the maximal size for the buffer | ||
* @default 2e8 | ||
*/ | ||
maxBufferSize?: number; | ||
} | ||
export interface ParseOptions { | ||
@@ -7,0 +19,0 @@ /** |
export * from './parse'; | ||
export * from './parseStream'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,2 +18,3 @@ "use strict"; | ||
__exportStar(require("./parse"), exports); | ||
__exportStar(require("./parseStream"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* Search for the corresponding closing tag '>' | ||
* @param data | ||
* @param i | ||
* @returns | ||
*/ | ||
export declare function closingIndexForOpeningTag(data: Uint8Array, i: number): { | ||
@@ -2,0 +8,0 @@ data: string; |
@@ -5,2 +5,8 @@ "use strict"; | ||
const utf8Decoder_1 = require("./utils/utf8Decoder"); | ||
/** | ||
* Search for the corresponding closing tag '>' | ||
* @param data | ||
* @param i | ||
* @returns | ||
*/ | ||
function closingIndexForOpeningTag(data, i) { | ||
@@ -29,8 +35,5 @@ let attrBoundary; | ||
} | ||
return { | ||
data: utf8Decoder_1.decoder.decode(data.subarray(i, i + endIndex)), | ||
index: 0, | ||
}; | ||
throw new Error('Could not find closing tag'); | ||
} | ||
exports.closingIndexForOpeningTag = closingIndexForOpeningTag; | ||
//# sourceMappingURL=closingIndexForOpeningTag.js.map |
@@ -5,2 +5,14 @@ import { XMLNode } from '../XMLNode'; | ||
}; | ||
export interface StreamParseOptions extends ParseOptions { | ||
/** | ||
* What is the maximal size (in bytes) of an entry | ||
* @default 1e7 | ||
*/ | ||
maxEntrySize?: number; | ||
/** | ||
* What is the maximal size for the buffer | ||
* @default 2e8 | ||
*/ | ||
maxBufferSize?: number; | ||
} | ||
export interface ParseOptions { | ||
@@ -7,0 +19,0 @@ /** |
{ | ||
"name": "arraybuffer-xml-parser", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"description": "Parse XML files contained in an array buffer", | ||
@@ -42,5 +42,5 @@ "main": "./lib/index.js", | ||
"@types/he": "^1.1.2", | ||
"@types/jest": "^27.5.0", | ||
"@types/jest": "^27.5.1", | ||
"cheminfo-build": "^1.1.11", | ||
"eslint": "^8.15.0", | ||
"eslint": "^8.16.0", | ||
"eslint-config-cheminfo-typescript": "^10.4.0", | ||
@@ -53,4 +53,4 @@ "he": "^1.2.0", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^28.0.2", | ||
"typescript": "^4.6.4", | ||
"ts-jest": "^28.0.3", | ||
"typescript": "^4.7.2", | ||
"uint8-base64": "^0.1.1" | ||
@@ -57,0 +57,0 @@ }, |
export * from './parse'; | ||
export * from './parseStream'; |
import { decoder } from './utils/utf8Decoder'; | ||
/** | ||
* Search for the corresponding closing tag '>' | ||
* @param data | ||
* @param i | ||
* @returns | ||
*/ | ||
export function closingIndexForOpeningTag( | ||
@@ -28,6 +34,3 @@ data: Uint8Array, | ||
} | ||
return { | ||
data: decoder.decode(data.subarray(i, i + endIndex)), | ||
index: 0, | ||
}; | ||
throw new Error('Could not find closing tag'); | ||
} |
@@ -10,2 +10,16 @@ import { XMLNode } from '../XMLNode'; | ||
}; | ||
export interface StreamParseOptions extends ParseOptions { | ||
/** | ||
* What is the maximal size (in bytes) of an entry | ||
* @default 1e7 | ||
*/ | ||
maxEntrySize?: number; | ||
/** | ||
* What is the maximal size for the buffer | ||
* @default 2e8 | ||
*/ | ||
maxBufferSize?: number; | ||
} | ||
export interface ParseOptions { | ||
@@ -96,2 +110,3 @@ /** | ||
} | ||
export const defaultOptions: ParseOptions = { | ||
@@ -98,0 +113,0 @@ trimValues: true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
206449
165
3141
0