{"id":13426733,"url":"https://github.com/regularjs/regular","last_synced_at":"2026-02-18T22:37:03.739Z","repository":{"id":17236842,"uuid":"20005946","full_name":"regularjs/regular","owner":"regularjs","description":"regularjs: a living template engine that helps us to create data-driven component.","archived":false,"fork":false,"pushed_at":"2023-03-15T05:44:28.000Z","size":4065,"stargazers_count":1056,"open_issues_count":35,"forks_count":150,"subscribers_count":67,"default_branch":"master","last_synced_at":"2026-01-23T02:38:04.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://regularjs.github.io/","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/regularjs.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}},"created_at":"2014-05-21T02:56:48.000Z","updated_at":"2025-11-22T05:18:39.000Z","dependencies_parsed_at":"2022-07-13T14:44:20.868Z","dependency_job_id":"51bbc51e-5be6-4b35-8389-94cfc72c3b65","html_url":"https://github.com/regularjs/regular","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/regularjs/regular","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regularjs%2Fregular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regularjs%2Fregular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regularjs%2Fregular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regularjs%2Fregular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regularjs","download_url":"https://codeload.github.com/regularjs/regular/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regularjs%2Fregular/sbom","scorecard":{"id":769161,"data":{"date":"2025-08-11","repo":{"name":"github.com/regularjs/regular","commit":"bdb9d43034c1310c3bc8179c1d3a240e22802fba"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":2,"reason":"Found 6/22 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T01:45:48.019Z","repository_id":17236842,"created_at":"2025-08-23T01:45:48.019Z","updated_at":"2025-08-23T01:45:48.019Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29597288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T22:25:43.180Z","status":"ssl_error","status_checked_at":"2026-02-18T22:25:42.766Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-07-31T00:01:43.024Z","updated_at":"2026-02-18T22:37:03.717Z","avatar_url":"https://github.com/regularjs.png","language":"JavaScript","readme":"[![regularjs](http://regularjs.github.io/image/regular-icon-100.png)](http://regularjs.github.io)\n\n# Regularjs\n\n\n[![Build Status](http://img.shields.io/travis/regularjs/regular/master.svg?style=flat-square)](http://travis-ci.org/regularjs/regular)\n\n\u003e Regularjs is a __living template engine__ that helps us to create data-driven components.\n\n\n* __[✨中文指南 ](http://regularjs.github.io/guide/zh/index.html)__\n* __[✨中文API ](http://regularjs.github.io/reference/?api-zh)__\n\n\n## Features\n\n- __String-based template__ makes it flexible to write your component;\n- __data-binding__ based on dirty-check: experience from AngularJS-like frameworks also makes sense to regularjs;\n- __self-contained and well-defined encapsulation__ makes it more easily integrated with other frameworks;\n- __composite components__: components can be used as \"custom elements\";\n- __directive, filter, event and animation...__  all you need is provided out of the box with __concise API__.\n\n\n\n## Quick Start\n\n### Example 1: __define a simple Note Component__\n\n```javascript\nvar Note = Regular.extend({\n  template:\n    \"\u003cinput {#if !disabled} r-model='hello' {#else} disabled {/if} \u003e {hello} \\\n    \u003cbutton on-click={disabled = !disabled}\u003e{disabled? 'active': 'disable'} it\u003c/button\u003e\"\n});\n\n// inject component into #app , you can also inject at 'before' , 'after', 'top'.\nvar note = new Note().$inject(\"#app\");\n\n```\n\n__[Example1 on codepen.io](http://codepen.io/leeluolee/pen/JqAaH)__\n\nThis example is dead simple, but you can find the directive and attribute is easily switched by statement 'if', which is difficult with other mvvm frameworks.\n\n\n### Example 2: __define a List Component__\n\n```javascript\nvar NoteList = Regular.extend({\n  template:\n    \"\u003cul\u003e{#list notes as nt}\" +\n      \"\u003cli class={nt.done? 'done': ''} on-click={nt.done= !nt.done}\u003e{{nt.content}}\u003c/li\u003e\" +\n    \"{/list}\u003c/ul\u003e\"\n});\n\nvar list = new NoteList({\n  data: {\n    notes: [\n      {content: 'playgame'},\n      {content: 'homework'}\n    ]\n  }\n}).$inject(\"#app\");\n\n```\n\nIn this Example, we create a ListView with the statement `list`.\n\n__[Example2 on codepen.io](http://codepen.io/leeluolee/pen/mAKlL)__\n\n\n### Example 3: combine Note with NoteList\n\nWe need to refactor Note to make it composable.\n\n```javascript\nvar Note = Regular.extend({\n  name: 'note',  // register component during the definition of Component\n  template:\n   \"\u003cinput r-model={draft}\u003e \u003cbutton on-click={this.post()}\u003e post\u003c/button\u003e\",\n  post: function(){\n    var data = this.data;\n    this.$emit('post', data.draft);\n    data.draft = \"\"; //clear the draft\n  }\n});\n\nRegular.component('list', NoteList);  // manual register a component\n\n```\n\nWhen 'Enter' is pressed, `Note` will emit a 'post' event with `draft` as the $event object.\n\n\u003e The keyword `this` in the template refers to the component itself.\n\nThen, let's define the core component: NoteApp.\n\n```javascript\nvar NoteApp = Regular.extend({\n  template:\n    \"\u003cnote on-post={notes.push({ content: $event} )}/\u003e\"+\n    \"\u003clist notes ={notes}\u003e\u003c/list\u003e\"\n});\n\nvar noteapp = new NoteApp({\n    data: {notes:[]}\n});\n\nnoteapp.$inject('#app');\n\n```\n\nyou can register a component (via attribute `name` or method `Component.component`) to make it composable in other components.\n\n__[Example3 on codepen.io](http://codepen.io/leeluolee/pen/bqkLp)__\n\n\nSee more on [Guide: Quick Start](http://regularjs.github.io/guide/en/getting-start/README.html)\n\n## Resources\n\n* __[Official Site ](http://regularjs.github.io)__\n* __[Reference ](http://regularjs.github.io/reference)__\n\n\n## Browser Compatibility\n\nIE7+ and other modern browsers.\n\n\n## Installation\n\n### bower\n\n```javascript\nbower install regularjs\n```\n\n`dist/regular.js` has been packaged as a standard UMD, and therefore you can use it in AMD, commonjs or global.\n\n### npm (browserify or other based on commonjs)\n\n```bash\n$ npm install regularjs\n```\n\nuse\n\n```js\nvar Regular = require('regularjs');\n```\n\n\n### component\n\n```bash\n$ component install regularjs/regular\n```\nuse\n\n```js\nvar Regular = require('regularjs/regular');\n```\n\n\n\n### Direct download\n\n1. [regular.js](https://rawgit.com/regularjs/regular/master/dist/regular.js)\n2. [regular.min.js](https://rawgit.com/regularjs/regular/master/dist/regular.min.js)\n\n\n## Who are using?\n\n1. [NetEase](https://github.com/NetEase): the operator of the famous website [www.163.com](http://www.163.com).\n\n\n\n## Community\n\n* If you find any bug or have any suggestion, please feel free to [open an issue](https://github.com/regularjs/regular/issues)\n\n* Ask any question on [Stack Overflow](http://stackoverflow.com/questions/tagged/regularjs) with tag `regularjs`.\n\n* Social\n  1. twitter: follow the [@regularjs](https://twitter.com/regularjs)\n  1. gitter: join chat at [![Gitter chat](https://badges.gitter.im/regularjs/regular.png)](https://gitter.im/regularjs/regular)\n  1. weibo: [@拴萝卜的棍子](http://weibo.com/luobolee)\n\n## Contributing\n\n__regularjs is still under heavy development__, and please help us with feedback. Contributing to this project is also welcome.\n\n* Please [open an issue](https://github.com/regularjs/regular/issues) before sending pull request\n* if needed, add your testcase in `test/specs` folder. Always make sure the `gulp test` is passed, and the `test/runner/index.html` is passed in every target browser (if a certain browser is not installed, list that in [gulpfile's karmaConfig](https://github.com/regularjs/regular/blob/master/gulpfile.js#L30))\n\n\n\n## LICENSE\n\n[MIT](https://github.com/regularjs/regular/blob/master/LICENSE).\n\n## TODO\n\nremove log code in production mode;","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregularjs%2Fregular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregularjs%2Fregular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregularjs%2Fregular/lists"}