{"id":19750211,"url":"https://github.com/fijimunkii/node-shim-require","last_synced_at":"2025-02-28T00:45:23.612Z","repository":{"id":57358475,"uuid":"195116166","full_name":"fijimunkii/node-shim-require","owner":"fijimunkii","description":"Pre-process javascript files as they get required","archived":false,"fork":false,"pushed_at":"2019-07-17T18:09:39.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T21:26:07.294Z","etag":null,"topics":["compile","instrumentation","optimize","pre-process","preprocess","process","require","shim","source"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fijimunkii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-03T19:36:03.000Z","updated_at":"2023-03-04T05:00:36.000Z","dependencies_parsed_at":"2022-09-06T21:41:15.125Z","dependency_job_id":null,"html_url":"https://github.com/fijimunkii/node-shim-require","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fijimunkii%2Fnode-shim-require","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fijimunkii%2Fnode-shim-require/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fijimunkii%2Fnode-shim-require/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fijimunkii%2Fnode-shim-require/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fijimunkii","download_url":"https://codeload.github.com/fijimunkii/node-shim-require/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241080292,"owners_count":19906258,"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":["compile","instrumentation","optimize","pre-process","preprocess","process","require","shim","source"],"created_at":"2024-11-12T02:31:45.365Z","updated_at":"2025-02-28T00:45:23.591Z","avatar_url":"https://github.com/fijimunkii.png","language":"JavaScript","readme":"# shim-require\n\nPre-process javascript files as they get `require`d\n\n```js\nconst shimRequire = require('shim-require');\nshimRequire((content, filename) =\u003e {\n  // return modified content\n  return `console.log(\"loading ${filename}\");\\n${content}`;\n});\n\nrequire('foo'); // `loading /path/to/foo`\n```\n\nCan also modify json files\n```js\nshimRequire(content =\u003e content.replace(/foo/g, 'bar'), 'json');\nrequire('foo.json'); // { \"a\": \"bar\" }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffijimunkii%2Fnode-shim-require","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffijimunkii%2Fnode-shim-require","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffijimunkii%2Fnode-shim-require/lists"}