{"id":20426037,"url":"https://github.com/seleb/kitsy","last_synced_at":"2026-05-26T23:09:40.794Z","repository":{"id":39258685,"uuid":"376438934","full_name":"seleb/kitsy","owner":"seleb","description":"Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags","archived":false,"fork":false,"pushed_at":"2024-06-17T14:07:19.000Z","size":325,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-18T21:09:15.204Z","etag":null,"topics":["hack","hacking","kitsy","monkey-patching"],"latest_commit_sha":null,"homepage":"https://seleb.github.io/kitsy/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seleb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-06-13T04:31:12.000Z","updated_at":"2024-06-17T14:07:21.000Z","dependencies_parsed_at":"2024-06-17T15:38:55.137Z","dependency_job_id":"9fa87543-4fce-4c98-96f9-0d28c46aea43","html_url":"https://github.com/seleb/kitsy","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":"0.40740740740740744","last_synced_commit":"dea43847dfd7b9f20650bcedadc33b222578a59e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fkitsy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fkitsy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fkitsy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fkitsy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seleb","download_url":"https://codeload.github.com/seleb/kitsy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241967055,"owners_count":20050331,"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":["hack","hacking","kitsy","monkey-patching"],"created_at":"2024-11-15T07:15:03.757Z","updated_at":"2026-05-26T23:09:40.758Z","avatar_url":"https://github.com/seleb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `kitsy`\n\nMonkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags\n\nBased on work by [@mildmojo](https://github.com/mildmojo) in [bitsy-hacks](https://github.com/seleb/bitsy-hacks)\n\n## How to use\n\n```sh\nnpm i kitsy\n```\n\nExample:\n\n```ts\nimport { kitsy } from \"kitsy\";\n\n// set up hooks/injections\n\nkitsy.before('someGlobal.someFn', () =\u003e { console.log('before someGlobal.someFn') });\nkitsy.after('someGlobal.someFn', () =\u003e { console.log('after someGlobal.someFn') });\nkitsy.inject(/(some code)/, 'injected before some code $1 injected after some code');\n\n// call\nkitsy.applyInjects();\n// between applying injections and hooks,\n// reinitialize any globals that referred to injected code\nkitsy.applyHooks();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseleb%2Fkitsy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseleb%2Fkitsy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseleb%2Fkitsy/lists"}