{"id":13493080,"url":"https://github.com/metarhia/metaschema","last_synced_at":"2025-03-22T00:09:47.236Z","repository":{"id":37924555,"uuid":"95108776","full_name":"metarhia/metaschema","owner":"metarhia","description":"Schema definition and validation 💡","archived":false,"fork":false,"pushed_at":"2024-09-22T09:00:20.000Z","size":1008,"stargazers_count":53,"open_issues_count":23,"forks_count":17,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-09T05:26:18.229Z","etag":null,"topics":["check","database","dsl","globalstorage","hacktoberfest","impress","javascript","js","json","meta-edu","metadata","metaprogramming","metarhia","node","nodejs","schema","type","types","validate"],"latest_commit_sha":null,"homepage":"https://metarhia.com","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/metarhia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"tshemsedinov"}},"created_at":"2017-06-22T11:32:52.000Z","updated_at":"2025-01-27T11:41:15.000Z","dependencies_parsed_at":"2023-02-08T14:00:25.193Z","dependency_job_id":"dc52549a-4996-4dad-9735-b129d7fce4c4","html_url":"https://github.com/metarhia/metaschema","commit_stats":{"total_commits":387,"total_committers":20,"mean_commits":19.35,"dds":"0.32041343669250644","last_synced_commit":"2f8b9d85968d1c7941ccd1dbd12a436fa6cb9d2f"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fmetaschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fmetaschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fmetaschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fmetaschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metarhia","download_url":"https://codeload.github.com/metarhia/metaschema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244722747,"owners_count":20499154,"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":["check","database","dsl","globalstorage","hacktoberfest","impress","javascript","js","json","meta-edu","metadata","metaprogramming","metarhia","node","nodejs","schema","type","types","validate"],"created_at":"2024-07-31T19:01:12.009Z","updated_at":"2025-03-22T00:09:47.204Z","avatar_url":"https://github.com/metarhia.png","language":"JavaScript","funding_links":["https://patreon.com/tshemsedinov"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Metaschema\n\nMetadata schema and interface (contract) definition language\n\n[![ci](https://github.com/metarhia/metaschema/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/metaschema/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster)\n[![snyk](https://snyk.io/test/github/metarhia/metaschema/badge.svg)](https://snyk.io/test/github/metarhia/metaschema)\n[![npm version](https://badge.fury.io/js/metaschema.svg)](https://badge.fury.io/js/metaschema)\n[![npm downloads/month](https://img.shields.io/npm/dm/metaschema.svg)](https://www.npmjs.com/package/metaschema)\n[![npm downloads](https://img.shields.io/npm/dt/metaschema.svg)](https://www.npmjs.com/package/metaschema)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/metarhia/metaschema/blob/master/LICENSE)\n\n## Installation\n\n```bash\n$ npm install metaschema\n```\n\n## Examples\n\n```js\nconst { Schema } = require('metaschema');\n\nconst schema = Schema.from({\n  name: {\n    first: 'string',\n    last: 'string',\n    third: '?string',\n  },\n  age: 'number',\n  levelOne: {\n    levelTwo: {\n      levelThree: { type: 'enum', enum: [1, 2, 3] },\n    },\n  },\n  collection: { array: { array: 'number' } },\n});\n\nconst data = {\n  name: {\n    first: 'a',\n    last: 'b',\n  },\n  age: 5,\n  levelOne: { levelTwo: { levelThree: 1 } },\n  collection: [\n    [1, 2, 3],\n    [3, 5, 6],\n  ],\n};\n\nconsole.log(schema.check(data));\n\n// Output:\n// ValidationResult { errors: [], valid: true }\n```\n\n## License \u0026 Contributors\n\nCopyright (c) 2017-2024 [Metarhia contributors](https://github.com/metarhia/metaschema/graphs/contributors).\nMetaschema is [MIT licensed](./LICENSE).\\\nMetaschema is a part of [Metarhia](https://github.com/metarhia) technology stack.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetarhia%2Fmetaschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetarhia%2Fmetaschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetarhia%2Fmetaschema/lists"}