{"id":23053619,"url":"https://github.com/component/model-schema","last_synced_at":"2025-04-03T04:25:01.727Z","repository":{"id":13379287,"uuid":"16067222","full_name":"component/model-schema","owner":"component","description":"A plugin that creates a model's attributes from a schema.","archived":false,"fork":false,"pushed_at":"2014-01-20T10:10:54.000Z","size":104,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-08T18:29:05.600Z","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/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2014-01-20T10:10:48.000Z","updated_at":"2014-01-20T10:10:54.000Z","dependencies_parsed_at":"2022-08-22T23:50:17.776Z","dependency_job_id":null,"html_url":"https://github.com/component/model-schema","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/component%2Fmodel-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fmodel-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fmodel-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fmodel-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/model-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246935377,"owners_count":20857397,"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-12-16T00:18:55.523Z","updated_at":"2025-04-03T04:25:01.705Z","avatar_url":"https://github.com/component.png","language":"JavaScript","readme":"\n# model-schema\n\n  A plugin that creates a model's attributes from a schema.\n\n## Installation\n\n    $ component install segmentio/model-schema\n    $ npm install model-schema\n\n## Example\n\n```js\nvar model = require('model');\nvar schema = require('model-schema');\n\nvar json = {\n  id: {\n    type: 'string',\n    required: true,\n    validators: [Function, Function]\n  },\n  name: {\n    type: 'string',\n    validators: [Function]\n  }\n};\n\nvar User = model()\n  .use(schema(json));\n```\n\n## API\n\n#### schema(json)\n\n  Return the plugin function for a given `json` schema.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fmodel-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fmodel-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fmodel-schema/lists"}