{"id":13666977,"url":"https://github.com/jrainlau/canjs","last_synced_at":"2025-08-28T12:09:18.235Z","repository":{"id":114419700,"uuid":"159754064","full_name":"jrainlau/canjs","owner":"jrainlau","description":"CanJS is a javascript interpreter, which can run JS code in JS.","archived":false,"fork":false,"pushed_at":"2020-04-23T06:53:56.000Z","size":227,"stargazers_count":345,"open_issues_count":5,"forks_count":63,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-19T13:07:10.071Z","etag":null,"topics":["frontend","javascript","javascript-interpreter"],"latest_commit_sha":null,"homepage":"https://codepen.io/jrainlau/pen/YRgQXo","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/jrainlau.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}},"created_at":"2018-11-30T02:00:49.000Z","updated_at":"2025-04-23T00:26:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"308dd8ce-ef77-49f2-b3bb-0a20942f20d6","html_url":"https://github.com/jrainlau/canjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jrainlau/canjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrainlau%2Fcanjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrainlau%2Fcanjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrainlau%2Fcanjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrainlau%2Fcanjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrainlau","download_url":"https://codeload.github.com/jrainlau/canjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrainlau%2Fcanjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272496435,"owners_count":24944495,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["frontend","javascript","javascript-interpreter"],"created_at":"2024-08-02T07:00:20.672Z","updated_at":"2025-08-28T12:09:18.204Z","avatar_url":"https://github.com/jrainlau.png","language":"JavaScript","readme":"# CanJS\n\n`CanJS` is a javascript interpreter, which can run JS code in JS.\n\nRelate article: [《\n前端与编译原理——用JS写一个JS解释器》](http://sfau.lt/b5bkvoY)\n\n## Install\n\n``` sh\ngit clone https://github.com/jrainlau/canjs.git\n```\n\n## Usage\nIt's fine to run the JS code in string directly.\n\n```javascript\nconst Canjs = require('./dist/index.js')\n\nnew Canjs(`\n  console.log('Hello World!')\n`).run()\n```\n\n`CanJS` uses ES5 standard library, but you can also provide custom variables to it:\n\n```javascript\nconst Canjs = require('./dist/index.js')\n\nconst wx = {\n  name: 'wx'\n}\n\nnew Canjs(`\n  console.log(wx.name)\n`, { wx }).run()\n```\n\n## License\nMIT","funding_links":[],"categories":["javascript interpreters"],"sub_categories":["old projects"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrainlau%2Fcanjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrainlau%2Fcanjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrainlau%2Fcanjs/lists"}