{"id":18563392,"url":"https://github.com/compulim/childprocess-messageport","last_synced_at":"2026-07-11T05:31:25.088Z","repository":{"id":82478826,"uuid":"133298274","full_name":"compulim/childprocess-messageport","owner":"compulim","description":"Turns ChildProcess IPC into MessagePort","archived":false,"fork":false,"pushed_at":"2018-07-19T22:48:02.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-26T16:41:41.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compulim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-05-14T03:06:45.000Z","updated_at":"2018-07-19T22:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d7f2ad8-0e2c-49ca-9860-9aa8bac40fa5","html_url":"https://github.com/compulim/childprocess-messageport","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/compulim/childprocess-messageport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fchildprocess-messageport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fchildprocess-messageport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fchildprocess-messageport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fchildprocess-messageport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/childprocess-messageport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fchildprocess-messageport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35352623,"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-07-11T02:00:05.354Z","response_time":104,"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":[],"created_at":"2024-11-06T22:12:30.278Z","updated_at":"2026-07-11T05:31:25.072Z","avatar_url":"https://github.com/compulim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# childprocess-messageport\n\n[![npm version](https://badge.fury.io/js/childprocess-messageport.svg)](https://badge.fury.io/js/childprocess-messageport) [![Build Status](https://travis-ci.org/compulim/childprocess-messageport.svg?branch=master)](https://travis-ci.org/compulim/childprocess-messageport)\n\nTurns [`ChildProcess`](https://nodejs.org/api/child_process.html) IPC into [MessagePort](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort).\n\n# Background\n\nInstead of learning/using different API for different communication channels, we should unite them into a single interface pattern, either [MessagePort](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) or [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket).\n\n# How to use\n\n```js\nconst childProcess = ChildProcess.fork('echo.js');\nconst messagePort = new ChildProcessMessagePort(childProcess);\n\nmessagePort.onmessage = event =\u003e {\n  // Could be either a string or Buffer\n  console.log(event.data);\n};\n\nmessagePort.postMessage('Hello, World!');\n```\n\n\u003e Instead of subscribing to `onmessage`, you can also subscribe using `on('message', handler)`.\n\nIf the underlying `childProcess.send` is failed, an `error` event will be emitted.\n\n# Contributions\n\nLike us? [Star](https://github.com/compulim/childprocess-messageport/stargazers) us.\n\nWant to make it better? [File](https://github.com/compulim/childprocess-messageport/issues) us an issue.\n\nDon't like something you see? [Submit](https://github.com/compulim/childprocess-messageport/pulls) a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fchildprocess-messageport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Fchildprocess-messageport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fchildprocess-messageport/lists"}