{"id":21521072,"url":"https://github.com/weisjohn/mongoose-latinize","last_synced_at":"2025-04-09T22:21:54.061Z","repository":{"id":57302105,"uuid":"44302854","full_name":"weisjohn/mongoose-latinize","owner":"weisjohn","description":"store the latin form of a String field for easy searching / sorting","archived":false,"fork":false,"pushed_at":"2019-01-11T10:51:48.000Z","size":152,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T00:15:15.911Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weisjohn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-15T08:08:52.000Z","updated_at":"2024-06-22T02:57:32.000Z","dependencies_parsed_at":"2022-09-20T14:14:17.145Z","dependency_job_id":null,"html_url":"https://github.com/weisjohn/mongoose-latinize","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/weisjohn%2Fmongoose-latinize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fmongoose-latinize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fmongoose-latinize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fmongoose-latinize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weisjohn","download_url":"https://codeload.github.com/weisjohn/mongoose-latinize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247682162,"owners_count":20978618,"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-24T01:05:39.763Z","updated_at":"2025-04-09T22:21:54.036Z","avatar_url":"https://github.com/weisjohn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoose-latinize\n\nstore the latin form of a String field for easy searching\n\n### usage\n\n```javascript\nvar mongoose_latinize = require('mongoose-latinize');\nvar user = new mongoose.Schema({ first_name: String });\nuser.plugin(mongoose_latinize, 'first_name');\n```\n\nThis adds a new path to your schema, `latin_first_name`, storing the lower-case, [`latinize`d](https://www.npmjs.com/package/latenize) copy of `first_name`.\n\n```javascript\nvar user1 = new user({ first_name : 'Björk' });\nuser1.save(function(err, doc) {\n    console.log(doc.latin_first_name); // returns 'bjork'\n});\n```\n\n### options\n\nYou can pass a simple string containing the property name (as above), or an object, with the following\n\n - `prop` - string, required - the data source for the `latin_`-prefixed property\n - `index` - bool, defaults `true` - creates index on the `latin_`-prefixed property\n - `json` - bool, defaults `false` - include the latinized property when calling `.toJSON()`\n\nFor example, to not use an index and to include the properties in JSON transforms:\n\n```javascript\nvar user = new mongoose.Schema({ first_name: String });\n\nuser.plugin(mongoose_latinize, {\n    prop: 'first_name',\n    index: false,\n    json: true\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisjohn%2Fmongoose-latinize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweisjohn%2Fmongoose-latinize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisjohn%2Fmongoose-latinize/lists"}