{"id":30414538,"url":"https://github.com/iam-abdul/mongo-parser-visualizer","last_synced_at":"2026-05-09T03:37:55.561Z","repository":{"id":239164116,"uuid":"798747800","full_name":"iam-abdul/mongo-parser-visualizer","owner":"iam-abdul","description":"The mongoose-parser package provides a streamlined way to extract Mongoose models from JavaScript files containing model definitions. This is particularly useful for documentation generation, code analysis, or refactoring tasks.","archived":false,"fork":false,"pushed_at":"2024-05-28T06:51:21.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T06:41:49.675Z","etag":null,"topics":["extract","extract-mongodb-schema","mongodb","mongoose","mongoose-parser","mongoose-schema","schema","schema-parser","visualization"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mongoose-parser","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/iam-abdul.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,"zenodo":null}},"created_at":"2024-05-10T11:40:34.000Z","updated_at":"2024-05-27T06:52:49.000Z","dependencies_parsed_at":"2024-05-17T07:29:50.140Z","dependency_job_id":"3b86bde1-a0d4-4902-86d1-af7be6b95107","html_url":"https://github.com/iam-abdul/mongo-parser-visualizer","commit_stats":null,"previous_names":["iam-abdul/mongo-parser-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iam-abdul/mongo-parser-visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abdul%2Fmongo-parser-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abdul%2Fmongo-parser-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abdul%2Fmongo-parser-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abdul%2Fmongo-parser-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iam-abdul","download_url":"https://codeload.github.com/iam-abdul/mongo-parser-visualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abdul%2Fmongo-parser-visualizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["extract","extract-mongodb-schema","mongodb","mongoose","mongoose-parser","mongoose-schema","schema","schema-parser","visualization"],"created_at":"2025-08-22T03:21:42.283Z","updated_at":"2026-05-09T03:37:55.555Z","avatar_url":"https://github.com/iam-abdul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoose-parser: Extract Mongoose Models from File Content\n\n### Description\n\nThe `mongoose-parser` package provides a streamlined way to extract Mongoose models from JavaScript files containing model definitions. This is particularly useful for documentation generation, code analysis, or refactoring tasks.\n\n### Installation\n\nInstall `mongoose-parser` using npm:\n\n```\nnpm install mongoose-parser\n```\n\n### Usage\n\nImport the extractModel function from the package and pass the file content as a string to extract information about the defined Mongoose models.\n\nHere's an example showing how to use mongoose-parser in your code:\n\n```\nimport extractModel from \"mongoose-parser\"\n# file content as string\nconst fileContent = `import mongoose from \"mongoose\";\nconst Schema = mongoose.Schema;\nlet UserSchema = new Schema({\n  name: {\n    type: String,\n    required: true,\n  },\n  email: {\n    type: String,\n    required: true,\n    unique: true,\n  },\n  password: {\n    type: String,\n    required: true,\n  },\n  date: {\n    type: Date,\n    default: Date.now,\n  },\n});\nconst User = mongoose.model(\"User\", UserSchema);\n`\nconst models = extractModel(fileContent);\n\nconsole.log(models)\n//  [\n//    {\n//      model: \"User\",\n//      jsSchemaName: \"UserSchema\",\n//      schema: {\n//        name: {\n//          type: \"String\",\n//          required: true,\n//        },\n//        email: {\n//          type: \"String\",\n//          required: true,\n//          unique: true,\n//        },\n//        password: {\n//          type: \"String\",\n//          required: true,\n//        },\n//        date: {\n//          type: \"Date\",\n//          default: \"Date.now\",\n//        },\n//      },\n//      nodeId: 3,\n//    },\n//  ]\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiam-abdul%2Fmongo-parser-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiam-abdul%2Fmongo-parser-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiam-abdul%2Fmongo-parser-visualizer/lists"}