{"id":18597841,"url":"https://github.com/siarheidudko/objectstream","last_synced_at":"2026-06-13T01:01:51.497Z","repository":{"id":57140023,"uuid":"198638536","full_name":"siarheidudko/objectstream","owner":"siarheidudko","description":"A powerful and efficient Node.js library for streaming JSON processing. Transform JSON strings to objects and objects to JSON strings with support for custom separators, multiple encodings, and high-performance streaming operations.","archived":false,"fork":false,"pushed_at":"2026-06-05T23:40:40.000Z","size":1548,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T01:14:30.010Z","etag":null,"topics":["json","json-parser","json-stream","jsonparser","jsonstream","nodejs","objectstream","stream","transform"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@sergdudko/objectstream","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siarheidudko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"dudko_dev","custom":["http://dudko.dev/donate","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"]}},"created_at":"2019-07-24T13:12:51.000Z","updated_at":"2026-06-05T23:40:41.000Z","dependencies_parsed_at":"2023-11-21T02:40:00.748Z","dependency_job_id":"d84675cb-d69b-4e1a-87c3-9bec01f8ce29","html_url":"https://github.com/siarheidudko/objectstream","commit_stats":null,"previous_names":[],"tags_count":178,"template":false,"template_full_name":null,"purl":"pkg:github/siarheidudko/objectstream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fobjectstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fobjectstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fobjectstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fobjectstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siarheidudko","download_url":"https://codeload.github.com/siarheidudko/objectstream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fobjectstream/sbom","scorecard":{"id":822116,"data":{"date":"2025-08-11","repo":{"name":"github.com/siarheidudko/objectstream","commit":"57bc5b99ad3171598c4e5252b9ba41e385f5a412"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/autoupdate.yml:1","Warn: no topLevel permission defined: .github/workflows/build-and-deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/build-and-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoupdate.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/autoupdate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-deploy.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/siarheidudko/objectstream/build-and-test.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:14.4.0-stretch to node:14.4.0-stretch@sha256:719d5524c7e927c2c3e49338c7dde7fe56cb5fdb3566cdaba5b37cc05ddf15da","Warn: npmCommand not pinned by hash: Dockerfile:3","Warn: npmCommand not pinned by hash: .github/workflows/build-and-deploy.yml:34","Warn: npmCommand not pinned by hash: .github/workflows/build-and-test.yml:34","Info:   0 out of  23 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   5 out of   8 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/autoupdate.yml:38"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T15:51:56.926Z","repository_id":57140023,"created_at":"2025-08-23T15:51:56.926Z","updated_at":"2025-08-23T15:51:56.926Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34268189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-parser","json-stream","jsonparser","jsonstream","nodejs","objectstream","stream","transform"],"created_at":"2024-11-07T01:29:36.698Z","updated_at":"2026-06-13T01:01:51.490Z","avatar_url":"https://github.com/siarheidudko.png","language":"TypeScript","funding_links":["https://patreon.com/dudko_dev","http://dudko.dev/donate","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"],"categories":[],"sub_categories":[],"readme":"﻿# @sergdudko/objectstream\n\nA powerful and efficient Node.js library for streaming JSON processing. Transform JSON strings to objects and objects to JSON strings with support for custom separators, multiple encodings, and high-performance streaming operations.\n\n[![npm](https://img.shields.io/npm/v/@sergdudko/objectstream.svg)](https://www.npmjs.com/package/@sergdudko/objectstream)\n[![npm](https://img.shields.io/npm/dy/@sergdudko/objectstream.svg)](https://www.npmjs.com/package/@sergdudko/objectstream)\n[![NpmLicense](https://img.shields.io/npm/l/@sergdudko/objectstream.svg)](https://www.npmjs.com/package/@sergdudko/objectstream)\n![GitHub last commit](https://img.shields.io/github/last-commit/siarheidudko/objectstream.svg)\n![GitHub release](https://img.shields.io/github/release/siarheidudko/objectstream.svg)\n\n## ✨ Features\n\n- **Dual Package**: Full ES Modules (ESM) and CommonJS (CJS) support\n- **TypeScript**: Complete type definitions included\n- **High Performance**: Based on native Node.js stream methods\n- **Multiple Encodings**: Support for utf8, base64, latin1, binary, and hex\n- **Custom Separators**: Configure start, middle, and end separators\n- **Memory Efficient**: Streaming approach for large JSON datasets\n- **Zero Dependencies**: No external dependencies\n\n## 📦 Installation\n\n```bash\nnpm install @sergdudko/objectstream\n```\n\n## 🚀 Quick Start\n\n### ESM (ES Modules)\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\n// String to Object conversion\nconst parser = new Parser();\nparser.on('data', (obj) =\u003e {\n  console.log('Parsed object:', obj);\n});\nparser.write('{\"name\":\"John\",\"age\":30}');\nparser.end();\n\n// Object to String conversion\nconst stringifer = new Stringifer();\nstringifer.on('data', (jsonString) =\u003e {\n  console.log('JSON string:', jsonString.toString());\n});\nstringifer.write({ name: 'John', age: 30 });\nstringifer.end();\n```\n\n### CommonJS\n\n```javascript\nconst { Parser, Stringifer } = require('@sergdudko/objectstream');\n\n// Or using default export\nconst objectstream = require('@sergdudko/objectstream');\nconst { Parser, Stringifer } = objectstream.default;\n```\n\n### TypeScript\n\n```typescript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\ninterface User {\n  name: string;\n  age: number;\n}\n\nconst parser = new Parser();\nparser.on('data', (user: User) =\u003e {\n  console.log(`User: ${user.name}, Age: ${user.age}`);\n});\n```\n\n## 📚 API Reference\n\n### Parser Class\n\nTransform stream that converts JSON strings to JavaScript objects.\n\n#### Constructor\n\n```typescript\nnew Parser(start?: string, middle?: string, end?: string)\n```\n\n#### Parameters\n\n- `start` (optional): First separator character (default: none)\n- `middle` (optional): Middle separator character (default: none)  \n- `end` (optional): End separator character (default: none)\n\n#### Methods\n\n- `setEncoding(encoding)`: Set input encoding (`utf8`, `utf-8`, `base64`, `latin1`, `binary`, `hex`)\n\n#### Events\n\n- `data`: Emitted when an object is parsed\n- `error`: Emitted when parsing fails\n- `end`: Emitted when stream ends\n- `finish`: Emitted when stream finishes\n\n### Stringifer Class\n\nTransform stream that converts JavaScript objects to JSON strings.\n\n#### Constructor\n\n```typescript\nnew Stringifer(start?: string, middle?: string, end?: string)\n```\n\n#### Parameters\n\n- `start` (optional): First separator character (default: none)\n- `middle` (optional): Middle separator character (default: none)\n- `end` (optional): End separator character (default: none)\n\n#### Methods\n\n- `setEncoding(encoding)`: Set output encoding (`utf8`, `utf-8`, `base64`, `latin1`, `binary`, `hex`)\n\n#### Events\n\n- `data`: Emitted when JSON string is generated\n- `error`: Emitted when stringification fails\n- `end`: Emitted when stream ends\n- `finish`: Emitted when stream finishes\n\n## 💡 Usage Examples\n\n### Basic JSON Processing\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\nconst parser = new Parser();\nconst stringifer = new Stringifer();\n\n// Parse JSON string\nparser.on('data', (obj) =\u003e {\n  console.log('Parsed:', obj);\n});\n\nparser.write('{\"message\":\"Hello World\"}');\nparser.end();\n\n// Stringify object\nstringifer.on('data', (data) =\u003e {\n  console.log('Stringified:', data.toString());\n});\n\nstringifer.write({ message: 'Hello World' });\nstringifer.end();\n```\n\n### Custom Separators for JSON Arrays\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\n// Process JSON array with custom separators\nconst parser = new Parser('[', ',', ']');\nconst stringifer = new Stringifer('[', ',', ']');\n\nstringifer.on('data', (data) =\u003e {\n  console.log('JSON Array chunk:', data.toString());\n});\n\n// Write multiple objects\nstringifer.write({ id: 1, name: 'Alice' });\nstringifer.write({ id: 2, name: 'Bob' });\nstringifer.write({ id: 3, name: 'Charlie' });\nstringifer.end(); // Output: [{\"id\":1,\"name\":\"Alice\"},{\"id\":2,\"name\":\"Bob\"},{\"id\":3,\"name\":\"Charlie\"}]\n```\n\n### Different Encodings\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\n// Base64 encoding\nconst stringifer = new Stringifer();\nstringifer.setEncoding('base64');\n\nstringifer.on('data', (data) =\u003e {\n  console.log('Base64 JSON:', data); // Base64 encoded JSON string\n});\n\nstringifer.write({ encoded: true });\nstringifer.end();\n\n// Parse Base64 encoded JSON\nconst parser = new Parser();\nparser.setEncoding('base64');\n\nparser.on('data', (obj) =\u003e {\n  console.log('Decoded object:', obj);\n});\n\n// Write base64 encoded JSON\nparser.write(Buffer.from('{\"decoded\":true}').toString('base64'));\nparser.end();\n```\n\n### Stream Piping\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\nimport { Transform } from 'stream';\n\n// Create a processing pipeline\nconst parser = new Parser();\nconst processor = new Transform({\n  objectMode: true,\n  transform(obj, encoding, callback) {\n    // Process each object\n    obj.processed = true;\n    obj.timestamp = Date.now();\n    callback(null, obj);\n  }\n});\nconst stringifer = new Stringifer();\n\n// Pipe the streams together\nparser\n  .pipe(processor)\n  .pipe(stringifer)\n  .on('data', (data) =\u003e {\n    console.log('Processed JSON:', data.toString());\n  });\n\n// Input data\nparser.write('{\"name\":\"test\"}');\nparser.end();\n```\n\n### Error Handling\n\n```javascript\nimport { Parser, Stringifer } from '@sergdudko/objectstream';\n\nconst parser = new Parser();\n\nparser.on('data', (obj) =\u003e {\n  console.log('Valid object:', obj);\n});\n\nparser.on('error', (errors) =\u003e {\n  console.error('Parsing errors:', errors);\n});\n\n// Valid JSON\nparser.write('{\"valid\":true}');\n\n// Invalid JSON\nparser.write('{\"invalid\":}');\n\nparser.end();\n```\n\n## 🎯 Supported Encodings\n\n| Encoding | Input | Output | Description |\n|----------|-------|--------|-------------|\n| `utf8` (default) | ✅ | ✅ | Standard UTF-8 text |\n| `utf-8` | ✅ | ✅ | Alias for utf8 |\n| `base64` | ✅ | ✅ | Base64 encoded data |\n| `latin1` | ✅ | ✅ | Latin-1 encoding |\n| `binary` | ✅ | ✅ | Binary data encoding |\n| `hex` | ✅ | ✅ | Hexadecimal encoding |\n\n## ⚡ Performance\n\nObjectStream is optimized for high-performance streaming operations:\n\n- **Memory Efficient**: Processes data in chunks, suitable for large JSON files\n- **Zero-Copy Operations**: Minimizes memory copying where possible\n- **Stream-Based**: Non-blocking operations using Node.js streams\n- **Optimized Parsing**: Efficient JSON parsing with error recovery\n\n## 🧪 Testing\n\nThe library includes comprehensive TypeScript tests:\n\n```bash\nnpm test\n```\n\nTest coverage includes:\n\n- ✅ Parser functionality with various data types\n- ✅ Stringifer functionality with validation\n- ✅ Custom separators and encodings\n- ✅ Stream piping and event handling\n- ✅ Error handling and edge cases\n- ✅ Performance benchmarks\n- ✅ ESM/CJS compatibility\n\n## 🏗️ Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Build dual package (ESM + CJS)\nnpm run build\n\n# Lint code\nnpm run lint\n```\n\n## 📄 Package Structure\n\n```\ndist/\n├── esm/          # ES Modules build\n├── cjs/          # CommonJS build\n└── types/        # Shared TypeScript definitions\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 🎯 Version History\n\n- **v3.x**: TypeScript rewrite, dual package support, modern Node.js features\n- **v2.x**: Enhanced performance and encoding support\n- **v1.x**: Initial release with basic streaming functionality\n\n## 📄 License\n\nMIT License - see [LICENSE](./LICENSE) file for details.\n\n## 🆘 Support\n\n- 📝 **Issues**: [GitHub Issues](https://github.com/siarheidudko/objectstream/issues)\n- 💬 **Discussions**: [GitHub Discussions](https://github.com/siarheidudko/objectstream/discussions)\n- 📧 **Email**: [siarhei@dudko.dev](mailto:siarhei@dudko.dev)\n\n## 💝 Support This Project\n\nIf ObjectStream helps you build amazing applications, consider supporting its development:\n\n- ☕ **[Buy me a coffee](https://www.buymeacoffee.com/dudko.dev)**\n- 💳 **[PayPal](https://paypal.me/dudkodev)**\n- 🎯 **[Patreon](https://patreon.com/dudko_dev)**\n- 🌐 **[More options](http://dudko.dev/donate)**\n\nYour support helps maintain and improve Redux Cluster for the entire community!\n\n---\n\n**Made with ❤️ by [Siarhei Dudko](https://github.com/siarheidudko)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Fobjectstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiarheidudko%2Fobjectstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Fobjectstream/lists"}