{"id":16188277,"url":"https://github.com/konsumer/mongoose-type-url","last_synced_at":"2025-03-19T03:30:39.620Z","repository":{"id":26461322,"uuid":"29912724","full_name":"konsumer/mongoose-type-url","owner":"konsumer","description":"A url field-type for Mongoose schemas","archived":false,"fork":false,"pushed_at":"2020-10-05T19:50:53.000Z","size":2002,"stargazers_count":15,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T02:51:24.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/konsumer.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":"2015-01-27T12:13:43.000Z","updated_at":"2021-09-01T18:45:21.000Z","dependencies_parsed_at":"2022-07-12T16:08:36.333Z","dependency_job_id":null,"html_url":"https://github.com/konsumer/mongoose-type-url","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmongoose-type-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmongoose-type-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmongoose-type-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmongoose-type-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konsumer","download_url":"https://codeload.github.com/konsumer/mongoose-type-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350660,"owners_count":20439284,"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-10-10T07:25:45.412Z","updated_at":"2025-03-19T03:30:39.141Z","avatar_url":"https://github.com/konsumer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoose-type-url\n\nA url field-type for Mongoose schemas\n\n[![npm](https://nodei.co/npm/mongoose-type-url.png)](https://www.npmjs.com/package/mongoose-type-url)\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/konsumer/mongoose-type-url.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/konsumer/mongoose-type-url.svg?branch=master)](https://travis-ci.org/konsumer/mongoose-type-url)\n[![Code Climate](https://codeclimate.com/github/konsumer/mongoose-type-url/badges/gpa.svg)](https://codeclimate.com/github/konsumer/mongoose-type-url)\n\n## usage\n\nThis will validate a url, correctly:\n\n```js\nvar mongoose = require('mongoose');\nrequire('mongoose-type-url');\n\nvar UserSchema = new mongoose.Schema({\n    url: {\n        work: mongoose.SchemaTypes.Url,\n        profile: mongoose.SchemaTypes.Url\n    }\n});\n```\n\nYou can also use the stuff in `String` type:\n\n```js\nvar UserSchema = new mongoose.Schema({\n    url: {\n        work: {type: mongoose.SchemaTypes.Url, required: true},\n        profile: {type: mongoose.SchemaTypes.Url, required: true},\n    }\n});\n```\n\nYou can also use it as an array:\n\n\n```js\nvar UserSchema = new mongoose.Schema({\n    urls: [{type: mongoose.SchemaTypes.Url}]\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fmongoose-type-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonsumer%2Fmongoose-type-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fmongoose-type-url/lists"}