{"id":15190639,"url":"https://github.com/cinemataztic/mongoose-alphanumeric","last_synced_at":"2026-03-04T15:31:07.459Z","repository":{"id":60783021,"uuid":"542964738","full_name":"cinemataztic/mongoose-alphanumeric","owner":"cinemataztic","description":"Alphanumeric characters generator plugin for Mongoose","archived":false,"fork":false,"pushed_at":"2022-10-12T08:22:26.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-28T12:39:03.555Z","etag":null,"topics":["alphanumeric","mongoose","plugin"],"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/cinemataztic.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":"2022-09-29T06:49:10.000Z","updated_at":"2022-10-03T07:10:48.000Z","dependencies_parsed_at":"2023-01-19T21:46:00.798Z","dependency_job_id":null,"html_url":"https://github.com/cinemataztic/mongoose-alphanumeric","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cinemataztic/mongoose-alphanumeric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinemataztic%2Fmongoose-alphanumeric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinemataztic%2Fmongoose-alphanumeric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinemataztic%2Fmongoose-alphanumeric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinemataztic%2Fmongoose-alphanumeric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinemataztic","download_url":"https://codeload.github.com/cinemataztic/mongoose-alphanumeric/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinemataztic%2Fmongoose-alphanumeric/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alphanumeric","mongoose","plugin"],"created_at":"2024-09-27T20:43:16.603Z","updated_at":"2026-03-04T15:31:07.114Z","avatar_url":"https://github.com/cinemataztic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoose-alphanumeric\n\nPlugin for Mongoose that generates alphanumeric code from a set of specified characters and length. Inspired by [mongoose-sluggable](https://www.npmjs.com/package/mongoose-sluggable).\n\n## Installation\n\n```sh\nnpm install mongoose-alphanumeric\n```\n\n## Requirements\n\nPlugin requires alphanumeric field path to be added to the model without the **required** property.\n\n## Usage\n\n```\nconst mongooseAlphanumeric = require('mongoose-alphanumeric');\n\nconst schema = new Schema({\n    alphanumeric: { type: String, index: true , unique: true}\n});\n\nschema.plugin(mongooseAlphanumeric)\n\nconst Model = mongoose.model('Model',  schema);\n```\n\n**Options**\nAdd options as per your requirements for alphanumeric code generation\n\n- `[options]` {Object}\n  - `[field]` {String} - Name of field for storing alphanumeric, field name must match the field name set on the model schema. Default value is **alphanumeric**\n  - `[unique]` {Boolean} - If unique is set to false then the same alphanumeric code can be used in other documents within the same collection. Default value is **true**\n  - `[length]` {Number} - Determines the length of the alphanumeric code to be generated. Default value is **4**\n  - `[chars]` {String} - Set of characters from where alphanumeric code can be generated. Default value is **0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ**\n\n### Example\n\n```\nschema.plugin(mongooseAlphanumeric, {\n  field: 'alphanumeric',\n  unique: true,\n  length: 5,\n  chars: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinemataztic%2Fmongoose-alphanumeric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinemataztic%2Fmongoose-alphanumeric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinemataztic%2Fmongoose-alphanumeric/lists"}