{"id":42248197,"url":"https://github.com/dhcmrlchtdj/sync-op","last_synced_at":"2026-01-27T04:51:17.590Z","repository":{"id":65581418,"uuid":"594719761","full_name":"dhcmrlchtdj/sync-op","owner":"dhcmrlchtdj","description":"Concurrent ML style first-class synchronous operations for JavaScript","archived":false,"fork":false,"pushed_at":"2025-06-11T12:14:48.000Z","size":555,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T11:05:00.211Z","etag":null,"topics":["channel","cml","concurrent-ml"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhcmrlchtdj.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":"2023-01-29T12:44:45.000Z","updated_at":"2025-06-23T02:46:58.000Z","dependencies_parsed_at":"2024-03-20T15:48:24.113Z","dependency_job_id":"8d933392-d964-4707-bb66-8b9c135f5f30","html_url":"https://github.com/dhcmrlchtdj/sync-op","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":"0.050000000000000044","last_synced_commit":"cd07fe2f3a4ffea05f4829ce89fe12474bdbd52b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/dhcmrlchtdj/sync-op","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhcmrlchtdj%2Fsync-op","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhcmrlchtdj%2Fsync-op/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhcmrlchtdj%2Fsync-op/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhcmrlchtdj%2Fsync-op/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhcmrlchtdj","download_url":"https://codeload.github.com/dhcmrlchtdj/sync-op/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhcmrlchtdj%2Fsync-op/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28803269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["channel","cml","concurrent-ml"],"created_at":"2026-01-27T04:51:17.001Z","updated_at":"2026-01-27T04:51:17.585Z","avatar_url":"https://github.com/dhcmrlchtdj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sync-op\n\n[![npm version](https://img.shields.io/npm/v/sync-op.svg)](https://www.npmjs.com/package/sync-op)\n\nConcurrent ML style first-class synchronous operations for JavaScript.\n\n## Installation\n\nInstall the package using npm:\n\n```sh\n$ npm install sync-op\n```\n\nOr explore and experiment directly in your browser with [StackBlitz](https://stackblitz.com/edit/sync-op?file=index.ts).\n\n## Usage\n\nBelow is a quick example to get you started:\n\n```typescript\nimport { Channel, choose } from \"sync-op\"\n\nconst c1 = new Channel\u003cstring\u003e()\nconst c2 = new Channel\u003cnumber\u003e()\nconst c3 = new Channel\u003cboolean\u003e()\n\nc1.send(\"hello\").sync()\nc2.send(1).sync()\nc3.receive().sync()\n\nconst op = choose(c1.receive(), c2.receive()) // Op\u003cOption\u003cstring\u003e | Option\u003cnumber\u003e\u003e\nawait op.sync().unwrap() // maybe \"hello\" or 1\n\n// `choose` can be nested\nawait choose(op, c3.send(true)).sync() // Option\u003cstring\u003e | Option\u003cnumber\u003e | boolean\n```\n\nDive into the [documentation](https://github.com/dhcmrlchtdj/sync-op/tree/main/doc) for the full API reference.\n\n## Resource\n\n- https://people.cs.uchicago.edu/~jhr/papers/cml.html\n- http://cml.cs.uchicago.edu/pages/cml.html\n- https://docs.racket-lang.org/reference/sync.html\n- https://ocaml.org/api/Event.html\n- https://wingolog.org/archives/2017/06/29/a-new-concurrent-ml\n- https://medium.com/@asolove/synchronizable-abstractions-for-understandable-concurrency-64ae57cd61d1\n- https://github.com/python-trio/trio/issues/242\n\n## License\n\nThis library is licensed under LGPL-2.1.\n\nThe core of this library is derived from OCaml [event](https://github.com/ocaml/ocaml/blob/5.0.0/otherlibs/systhreads/event.ml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhcmrlchtdj%2Fsync-op","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhcmrlchtdj%2Fsync-op","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhcmrlchtdj%2Fsync-op/lists"}