{"id":21030187,"url":"https://github.com/varharrie/run-my-code","last_synced_at":"2026-05-01T08:32:46.467Z","repository":{"id":96983246,"uuid":"367001266","full_name":"varHarrie/run-my-code","owner":"varHarrie","description":"Execute javascript code from a string based on new function.","archived":false,"fork":false,"pushed_at":"2021-05-13T09:55:25.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T15:18:26.631Z","etag":null,"topics":["code","execute","function","javascript","run"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/varHarrie.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":"2021-05-13T09:37:49.000Z","updated_at":"2022-02-08T19:21:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"8916e318-a109-4d00-be22-2e62c82ad439","html_url":"https://github.com/varHarrie/run-my-code","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"8ef736b8feb76637a196ae7121ae5fa19e269f57"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varHarrie%2Frun-my-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varHarrie%2Frun-my-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varHarrie%2Frun-my-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varHarrie%2Frun-my-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varHarrie","download_url":"https://codeload.github.com/varHarrie/run-my-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243466986,"owners_count":20295310,"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":["code","execute","function","javascript","run"],"created_at":"2024-11-19T12:16:43.963Z","updated_at":"2025-12-27T11:16:33.771Z","avatar_url":"https://github.com/varHarrie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# run-my-code\n\nExecute javascript code from a string based on new function, inspired by [zx](https://github.com/google/zx).\n\n## Install\n\n```bash\n$ npm install --save run-my-code\n```\n\n## Usage\n\n**Tagged Template:**\n\n```javascript\nconst $ = require('run-my-code');\n\nconst obj = { foo: 'foo' };\nconst arr = [1, 2];\n\nconsole.log($`return 1 + 1`); // 2\nconsole.log($`return ${obj}`); // { foo: 'foo' }\nconsole.log($`return ${arr}.map((n) =\u003e n * 2)`); // [2, 4]\n```\n\n**Normal Function:**\n\n```javascript\nconst $ = require('run-my-code');\n\nconsole.log($('return 1 + 1')); // 2\n```\n\n**With Context:**\n\n```javascript\nconsole.log($({ a: 1, b: 2 })(`return a + b`)); // 3\nconsole.log($({ a: 1, b: 2 })`return a + b`); // 3\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarharrie%2Frun-my-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarharrie%2Frun-my-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarharrie%2Frun-my-code/lists"}