{"id":13517698,"url":"https://github.com/canjs/canjs","last_synced_at":"2025-12-16T15:30:41.395Z","repository":{"id":2271751,"uuid":"3228363","full_name":"canjs/canjs","owner":"canjs","description":"Build CRUD apps in fewer lines of code.","archived":false,"fork":false,"pushed_at":"2023-08-03T19:56:13.000Z","size":185685,"stargazers_count":1916,"open_issues_count":312,"forks_count":421,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-18T04:34:46.211Z","etag":null,"topics":["canjs","crud","dom","framework","javascript"],"latest_commit_sha":null,"homepage":"https://canjs.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canjs.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-01-20T17:57:21.000Z","updated_at":"2025-04-02T11:58:19.000Z","dependencies_parsed_at":"2024-01-08T09:04:51.937Z","dependency_job_id":"8fb8c4e0-6537-4830-be7c-208e0596d063","html_url":"https://github.com/canjs/canjs","commit_stats":{"total_commits":8174,"total_committers":251,"mean_commits":32.56573705179283,"dds":0.7801565940787865,"last_synced_commit":"6d990397eca6bda0fc78613eee79bb67b1b45d95"},"previous_names":["bitovi/canjs"],"tags_count":325,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcanjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcanjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcanjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fcanjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canjs","download_url":"https://codeload.github.com/canjs/canjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253842683,"owners_count":21972858,"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":["canjs","crud","dom","framework","javascript"],"created_at":"2024-08-01T05:01:36.425Z","updated_at":"2025-12-16T15:30:41.333Z","avatar_url":"https://github.com/canjs.png","language":"JavaScript","readme":"# [CanJS](https://canjs.com/)\n\n [![SauceLabs Test Status](https://saucelabs.com/browser-matrix/canjs-not-master.svg)](https://saucelabs.com/u/canjs-not-master)\n\n[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-611f69.svg)](https://www.bitovi.com/community/slack?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Join our Discourse](https://img.shields.io/discourse/https/forums.bitovi.com/posts.svg)](https://forums.bitovi.com/?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![npm version](https://badge.fury.io/js/can.svg)](https://www.npmjs.com/package/can)\n[![Build Status](https://travis-ci.org/canjs/canjs.svg?branch=master)](https://travis-ci.org/canjs/canjs)\n[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/canjs.svg)](https://greenkeeper.io/)\n\nCanJS is a collection of client-side JavaScript architectural libraries.\n\n### Web Components\n\nCanJS’s [StacheElement](https://canjs.com/doc/can-stache-element.html) allows you to create Web Components with [observable properties](https://canjs.com/doc/can-observable-object.html) and [live-bound templates](https://canjs.com/doc/can-stache.html).\n\n```js\nclass Counter extends StacheElement {\n\tstatic view = `\n\t\tCount: \u003cspan\u003e{{ this.count }}\u003c/span\u003e\n\t\t\u003cbutton on:click=\"this.increment()\"\u003e+1\u003c/button\u003e\n\t`;\n\n\tstatic props = {\n\t\tcount: 0\n\t};\n\n\tincrement() {\n\t\tthis.count++;\n\t}\n}\ncustomElements.define(\"my-counter\", Counter);\n```\n\n### Model layer\n\nComponents shouldn’t be concerned with how data is fetched, updated, or cached.\n\nCanJS provides the right abstractions for your model code to be cleanly separated from your UI code. [Learn more…](./readme-feature-model-layer.md)\n\n\u003cimg src=\"https://canjs.com/docs/images/animations/model-layer-still.svg\" width=\"270\" /\u003e\n\n### Promises in templates\n\nCanJS’s [stache templating language](https://canjs.com/doc/can-stache.html) can directly read the state and values from [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n\nNo need to write any extra code to determine whether a Promise is pending, resolved, or rejected. [Learn more…](./readme-feature-promises-in-templates.md)\n\n```handlebars\n{{# if(this.promise.isPending) }}\n  Loading…\n{{/ if }}\n{{# if(this.promise.isRejected) }}\n  Error: {{ this.promise.reason }}\n{{/ if }}\n{{# if(this.promise.isResolved) }}\n  Result: {{ this.promise.value }}\n{{/ if }}\n```\n\n### Real-time list updating\n\nAfter data is created, updated, or destroyed, CanJS automatically updates your lists for you.\n\nFiltering and sorting are preserved, so you don’t have to manually update your lists or fetch the same data again. [Learn more…](./readme-feature-real-time-list-updating.md)\n\n\u003cimg src=\"https://canjs.com/docs/images/animations/realtime-amin.svg\" width=\"270\" /\u003e\n\n### Getting Started\n\nReady to get started? See the [Setting Up CanJS](https://canjs.com/doc/guides/setup.html), [API Docs](https://canjs.com/doc/api.html) and [Guides](https://canjs.com/doc/guides.html) pages.\n\n### Support / Contributing\n\nBefore you make an issue, please read our [Contributing](https://canjs.com/doc/guides/contribute.html) guide.\n\nYou can find the core team on [Slack](https://www.bitovi.com/community/slack).\n\n### Release History\n\nSee [Releases](https://github.com/canjs/canjs/releases).\n\n### License\n\n[MIT License](license.md).\n","funding_links":[],"categories":["JavaScript","MVC Frameworks and Libraries","MVC Frameworks and Libraries [🔝](#readme)","MVC 框架和库"],"sub_categories":["Runner","运行器","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fcanjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanjs%2Fcanjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fcanjs/lists"}