{"id":20572744,"url":"https://github.com/molnarmark/require-parser","last_synced_at":"2025-06-16T02:32:55.363Z","repository":{"id":92791058,"uuid":"145313425","full_name":"molnarmark/require-parser","owner":"molnarmark","description":"📙 A tiny, zero dependency ES5 require parser","archived":false,"fork":false,"pushed_at":"2018-08-19T19:55:40.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T07:10:00.175Z","etag":null,"topics":[],"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/molnarmark.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-19T15:09:07.000Z","updated_at":"2018-08-20T23:55:06.000Z","dependencies_parsed_at":"2023-04-21T06:35:38.512Z","dependency_job_id":null,"html_url":"https://github.com/molnarmark/require-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/molnarmark/require-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Frequire-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Frequire-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Frequire-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Frequire-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molnarmark","download_url":"https://codeload.github.com/molnarmark/require-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Frequire-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260086014,"owners_count":22956721,"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":[],"created_at":"2024-11-16T05:23:38.427Z","updated_at":"2025-06-16T02:32:55.222Z","avatar_url":"https://github.com/molnarmark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Require Parser\n\n\u003e A tiny, zero dependency ES5 require parser.\n\n`require-parser` provides a simple and easy way to parse EcmaScript 5 `require` statements.\n\n### Installation\n```\nnpm install --save require-parser\n```\n\n### Usage\nYou can find a working example in `tester.js`.\n```javascript\nconst RequireParser = require('./index');\n\nconst testCode = `\nconst moduleA = require('./moduleA');\nconst moduleB = require('./moduleB');\nconst moduleC = require('./moduleC');\n\nconst fs = require('fs');\n`;\n\nconst requires = RequireParser(testCode);\nconsole.log(requires);\n/* =\u003e\n[ { originalMatch: 'require(\\'./moduleA\\')',\n    modulePath: './moduleA',\n    isInstalledModule: false },\n  { originalMatch: 'require(\\'./moduleB\\')',\n    modulePath: './moduleB',\n    isInstalledModule: false },\n  { originalMatch: 'require(\\'./moduleC\\')',\n    modulePath: './moduleC',\n    isInstalledModule: false },\n  { originalMatch: 'require(\\'fs\\')',\n    modulePath: 'fs',\n    isInstalledModule: true } ]\n*/\n```\n\n### License\n- MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolnarmark%2Frequire-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolnarmark%2Frequire-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolnarmark%2Frequire-parser/lists"}