json-stream-lite 1.0.4 → 1.0.5
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/README.md +2 -0
- package/dist/byte-buffer.d.ts +1 -1
- package/dist/byte-buffer.js +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/stringify.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/byte-buffer.d.ts
CHANGED
package/dist/byte-buffer.js
CHANGED
package/dist/generators.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JsonKeyValuePair } from './types';
|
|
1
|
+
import { JsonKeyValuePair } from './types.js';
|
|
2
2
|
export declare function jsonKeyValueParser(bytes: Iterable<number> | string): Generator<JsonKeyValuePair>;
|
|
3
3
|
export declare function jsonKeyValueParserAsync(bytes: Iterable<number> | AsyncIterable<number> | string | ReadableStream<number> | ReadableStream<Uint8Array> | ReadableStream<string>): AsyncGenerator<JsonKeyValuePair>;
|
package/dist/generators.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonKeyValueParser } from './parser';
|
|
2
|
-
import { stringToBytes } from './utils';
|
|
1
|
+
import { JsonKeyValueParser } from './parser.js';
|
|
2
|
+
import { stringToBytes } from './utils.js';
|
|
3
3
|
export function* jsonKeyValueParser(bytes) {
|
|
4
4
|
if (typeof bytes === 'string') {
|
|
5
5
|
bytes = stringToBytes(bytes);
|
package/dist/stringify.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stringToBytes } from './utils';
|
|
1
|
+
import { stringToBytes } from './utils.js';
|
|
2
2
|
function* formatString(str, chunkSize = 1024) {
|
|
3
3
|
const formatted = `"${str.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t')}"`;
|
|
4
4
|
let i = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-stream-lite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "A lightweight, memory-efficient, zero-dependency streaming JSON parser and stringifier for JavaScript and TypeScript. It works in both Node.js and browser environments.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|