{"id":16373131,"url":"https://github.com/bbqsrc/telekom","last_synced_at":"2025-07-16T22:34:23.968Z","repository":{"id":66192723,"uuid":"53110594","full_name":"bbqsrc/telekom","owner":"bbqsrc","description":null,"archived":false,"fork":false,"pushed_at":"2016-03-05T14:26:16.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T21:11:56.490Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbqsrc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-03-04T05:42:42.000Z","updated_at":"2016-03-08T08:16:51.000Z","dependencies_parsed_at":"2023-07-15T13:03:08.032Z","dependency_job_id":null,"html_url":"https://github.com/bbqsrc/telekom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Ftelekom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Ftelekom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Ftelekom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Ftelekom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbqsrc","download_url":"https://codeload.github.com/bbqsrc/telekom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239933240,"owners_count":19720751,"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":[],"created_at":"2024-10-11T03:13:26.915Z","updated_at":"2025-02-21T00:32:44.042Z","avatar_url":"https://github.com/bbqsrc.png","language":"JavaScript","readme":"# telekom\n\nAn experiment in applying principles of Erlang's OTP (Open Telecom Platform) to\nJavaScript for fun and glory.\n\n## Example\n\n`send` returns a `Promise`.\n\n```javascript\n// parent.js\nconst { Process } = require(\"telekom/process\")\n\nconst p = new Process(\"./path/to/child.js\")\n\np.send({ question: \"meaning of universe?\" }).then(msg =\u003e {\n  console.log(msg) // =\u003e prints { answer: 42 }\n})\n```\n\n```javascript\n// child.js\nconst { ChildProcess } = require(\"telekom/process\")\n\nconst proc = new ChildProcess(msg =\u003e {\n  console.log(\"Got message:\", msg)\n\n  // Return what you want to reply, if anything\n  return { answer: 42 }\n})\n\nconst proc2 = new ChildProcess(function*(msg) {\n  // You can use generators as well!\n  const res = yield someYieldable(msg)\n\n  return res\n})\n```\n\n```javascript\n/* worker.js */\nconst { ChildProcess } = require(\"telekom/process\")\n\n// Simply multiple what is received\nconst proc = new ChildProcess(value =\u003e value * 2)\n\n/* poolexample.js */\nconst { Pool } = require(\"telekom/pool\")\n\nconst pool = new Pool(\"./path/to/worker.js\") // Defaults to using number of CPUs\nconst data = [1, 2, 3, 4]\n\nconst res1 = yield pool.map(data) // =\u003e [2, 4, 6, 8]\nconst res2 = yield pool.reduce(data, (cur, next) =\u003e {\n  return cur + next\n}, 0) // =\u003e 20\n```\n\n## License\n\nBSD 2-clause license. See LICENSE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Ftelekom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbqsrc%2Ftelekom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Ftelekom/lists"}