{"id":19346360,"url":"https://github.com/canjs/can-bacon","last_synced_at":"2025-12-12T04:23:21.965Z","repository":{"id":17142297,"uuid":"19908879","full_name":"canjs/can-bacon","owner":"canjs","description":"Bacon.js integration for CanJS (and vice-versa)","archived":false,"fork":false,"pushed_at":"2017-08-15T23:32:50.000Z","size":902,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-02T08:35:53.164Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-18T11:17:08.000Z","updated_at":"2023-07-20T16:58:20.000Z","dependencies_parsed_at":"2022-08-31T00:31:30.632Z","dependency_job_id":null,"html_url":"https://github.com/canjs/can-bacon","commit_stats":null,"previous_names":["sykopomp/can.bacon"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcan-bacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcan-bacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcan-bacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcan-bacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canjs","download_url":"https://codeload.github.com/canjs/can-bacon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372530,"owners_count":21419719,"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-11-10T04:09:58.116Z","updated_at":"2025-12-12T04:23:21.932Z","avatar_url":"https://github.com/canjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NOT MAINTAINED! This project is abandoned,\n\n\n## can.bacon\n\n`can.bacon` is a [CanJS](https://github.com/bitovi/canjs) plugin that lets you\ncreate [Bacon.js](https://github.com/baconjs/bacon.js) `EventStream`s and\n`Property`s from `CanJS` event handlers, as well as feed `Bacon` observable\nstreams back into `CanJS` observables. The result is a delicious,\ncanned-bacon-flavored mix of\n[FRP](https://en.wikipedia.org/wiki/Functional_reactive_programming) and\n`CanJS`-style declarative MVC.\n\n`can.bacon` implements the\n[can.eventstream](https://github.com/zkat/can.eventstream) interface and\nadds a few methods to `Bacon` objects (documented below). For information on the\n`CanJS` side of the interface, please refer to `can.eventstream`'s documentation.\n\nCheck out `dist/sandbox.html` and `dist/sandbox.js` for some rough usage\nexamples, including a fairly short drag-and-drop demo using `can.Component`, and\nsuper-simple, single-line two-way binding between pairs of computes and pairs of\n`can.Map`s.\n\n`can.bacon` is\n[hosted at Github](http://github.com/zkat/can.bacon). `can.bacon` is a\npublic domain work, dedicated using\n[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). Feel free to do\nwhatever you want with it.\n\n# Quickstart\n\n### Install\n\n`$ npm install can.bacon`\nor\n`$ bower install can.bacon`\n\nPrebuilt releases are included in `dist`. Releases tagged as `full` include\n`Bacon`, `jQuery`, and `CanJS` in a single package. The others expect the other\nlibraries to have already been loaded.\n\n### Example\n\n```javascript\nvar compute = can.compute(),\n    property = compute.bind();\n\nproperty.log(\"Property has new value:\");\n\ncompute(1);\n\nproperty.toCompute().bind(\"change\", function() {\n  console.log(\"compute updated from property change.\");\n});\n\ncompute(2);\n\n```\n\n# Documentation\n\nFor the most part, `can.bacon` is a straightforward implementation of the\n`can.eventstream` interface. For most bindings, it will return a\n`Bacon.EventStream` instance. The only exception to this is when bindings are\nmade to `can.compute` instances, in which case a `Bacon.Property` is returned,\nwith the current value of the `can.compute` as its initial value.\n\n`can.bacon` also extends `Bacon.Observable.prototype` with a few utility methods\nthat directly wrap `can.eventstream` functions, documented below.\n\n### `Bacon.Observable#toCompute([compute=can.compute()])`\n\nWraps `can.bindComputeFromStream`.\n\n`stream.toCompute(compute)` is the same as `can.bindComputeFromStream(stream,\ncompute);`\n\n### `Bacon.Observable#toMap([map=new can.Map()])`\n\nWraps `can.bindMapFromStream`.\n\n`stream.toMap(compute)` is the same as `can.bindMapFromStream(stream,\ncompute);`\n\n### `Bacon.Observable#toList([list=new can.List()])`\n\nWraps `can.bindListFromStream`.\n\n`stream.toList(compute)` is the same as `can.bindListFromStream(stream,\ncompute);`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fcan-bacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanjs%2Fcan-bacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fcan-bacon/lists"}