{"id":18597841,"url":"https://github.com/siarheidudko/objectstream","last_synced_at":"2026-02-08T15:01:08.156Z","repository":{"id":57140023,"uuid":"198638536","full_name":"siarheidudko/objectstream","owner":"siarheidudko","description":"Creates a stream to convert json from string or convert json to stream. The stream is based on the incoming object stream.","archived":false,"fork":false,"pushed_at":"2024-11-23T02:21:47.000Z","size":1281,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T01:33:03.625Z","etag":null,"topics":["json","json-parser","json-stream","jsonparser","jsonstream","nodejs","objectstream","stream","transform"],"latest_commit_sha":null,"homepage":"https://siarheidudko.github.io/objectstream/","language":"JavaScript","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},"funding":{"patreon":"dudko_dev","custom":["https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"]}},"created_at":"2019-07-24T13:12:51.000Z","updated_at":"2024-11-23T02:21:51.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":129,"template":false,"template_full_name":null,"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/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261993,"owners_count":21074229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-10-10T10:39:06.327Z","avatar_url":"https://github.com/siarheidudko.png","language":"JavaScript","readme":"﻿# @sergdudko/objectstream\n\nRevolutionize Your JSON Handling with Streamlined Efficiency: Seamlessly Convert JSON from String or Transform JSON to Drain with this Powerful Stream Creation Tool. Harness the Power of Object Streams for Swift and Seamless Data Processing!\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- Based on native methods of NodeJS\n\n## INSTALL\n\n```bash\n npm i @sergdudko/objectstream --save\n```\n\n## DOCS\n\n[See docs](https://siarheidudko.github.io/objectstream/index.html)\n\n## SUPPORTED ENCODING\n\n| Stream     | incoming stream                   | outgoing stream                   |\n| ---------- | --------------------------------- | --------------------------------- |\n| Stringifer | utf8 (object mode)                | utf8, base64, latin1, binary, hex |\n| Parser     | utf8, base64, latin1, binary, hex | utf8 (object mode)                |\n\n## USE\n\n```js\n// REQUIRE OR IMPORT CLASS\n\nconst Stringifer = require(\"@sergdudko/objectstream\").Stringifer;\nconst Parser = require(\"@sergdudko/objectstream\").Parser;\n// or use import\nimport { Stringifer, Parser } from \"@sergdudko/objectstream\";\n\n// CREATE STREAM\n\nconst firstSeparator = \"[\";\nconst middleSeparator = \",\";\nconst endSeparator = \"]\";\nconst stringToObject = new Parser(\n  firstSeparator,\n  middleSeparator,\n  endSeparator\n);\nconst objectToString = new Stringifer(\n  firstSeparator,\n  middleSeparator,\n  endSeparator\n);\n\n// EVENTS\n\nstringToObject.on(\"data\", (e) =\u003e {\n  // e - is Object\n});\nstringToObject.on(\"error\", (d) =\u003e {\n  // e - Array of Error\n});\nstringToObject.on(\"end\", () =\u003e {\n  // end event\n});\nstringToObject.on(\"finish\", () =\u003e {\n  // finish event\n});\nobjectToString.on(\"data\", (e) =\u003e {\n  // e - is Buffer (deault, if you need a string use setEncoding)\n});\nobjectToString.on(\"error\", (d) =\u003e {\n  // e - Array of Error\n});\nobjectToString.on(\"end\", () =\u003e {\n  // end event\n});\nobjectToString.on(\"finish\", () =\u003e {\n  // finish event\n});\n\n// CHANGE ENCODING\n\nstringToObject.setEncoding(\"latin1\");\nobjectToString.setEncoding(\"latin1\");\n\n// WRITE DATA (example for utf8)\n\nstringToObject.write('{\"boolean\":true}');\nobjectToString.write({ boolean: true });\n\n// PIPE\n\nstringToObject.pipe(objectToString);\n```\n\n## EXAMPLE\n\n[see test directory](https://github.com/siarheidudko/objectstream/tree/master/test)\n\n## OLDER VERSIONS\n\n- [v2.0.5](https://www.npmjs.com/package/@sergdudko/objectstream/v/2.0.5) - supported Node 8\n\n## LICENSE\n\nMIT\n","funding_links":["https://patreon.com/dudko_dev","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"],"categories":[],"sub_categories":[],"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"}