json-stream-lite 1.0.3 → 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 +1 -5
- 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.d.ts +1 -2
- package/dist/stringify.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -369,8 +369,4 @@ Contributions welcome! Please ensure:
|
|
|
369
369
|
- Code compiles: `pnpm compile`
|
|
370
370
|
- Coverage maintained: `pnpm test -- --coverage`
|
|
371
371
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
- [json-stream](https://www.npmjs.com/package/json-stream) - Alternative streaming JSON parser
|
|
375
|
-
- [stream-json](https://www.npmjs.com/package/stream-json) - Node.js streaming JSON parser
|
|
376
|
-
- [jsonparse](https://www.npmjs.com/package/jsonparse) - Pure JavaScript streaming JSON parser
|
|
372
|
+
For more details, see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
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.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
type JsonStreamStringifyOptions = {
|
|
1
|
+
export type JsonStreamStringifyOptions = {
|
|
2
2
|
stringChunkSize?: number;
|
|
3
3
|
};
|
|
4
4
|
export declare function jsonStreamStringify(value: unknown, replacer?: any, indent?: number, options?: JsonStreamStringifyOptions): Generator<string>;
|
|
5
5
|
export declare function jsonStreamStringifyBytes(value: unknown, replacer?: any, indent?: number, options?: JsonStreamStringifyOptions): Generator<Uint8Array>;
|
|
6
|
-
export {};
|
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",
|