{"id":25812352,"url":"https://github.com/codeekage/schema","last_synced_at":"2025-02-28T01:53:41.243Z","repository":{"id":57103011,"uuid":"196021665","full_name":"codeekage/schema","owner":"codeekage","description":"Firebase User Defined Schema","archived":false,"fork":false,"pushed_at":"2019-07-16T18:11:26.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T07:46:45.267Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeekage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-09T14:09:36.000Z","updated_at":"2024-12-11T20:29:04.000Z","dependencies_parsed_at":"2022-08-20T20:40:50.563Z","dependency_job_id":null,"html_url":"https://github.com/codeekage/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/codeekage%2Fschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeekage%2Fschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeekage%2Fschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeekage%2Fschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeekage","download_url":"https://codeload.github.com/codeekage/schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241086995,"owners_count":19907368,"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":"2025-02-28T01:53:40.729Z","updated_at":"2025-02-28T01:53:41.236Z","avatar_url":"https://github.com/codeekage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @codeekage/schema\n \nSchema is an open source `0` dependency package inspired by the schemaless nature of Firebase. Schema helps you add \"schema\" definitions to a schemaless database you'd prefer to have schemas, like Firebase. Schema also comes with Typescript Lang support. \n\nSchema is pretty easy to use, and to get started with. \n\n## Installation\n\n```shell \n  npm i @codeekage/schema\n```\n\n## Usage\n\n```js \nimport { schema } from '@codeekage/schema'\n\nconst UserSchema = schema({\n  firstname: {\n    type: \"string\",\n    required: true,\n    value: \"Joe\"\n  },\n  lastname: {\n    type: \"string\",\n    required: true,\n    value: \"Doe\"\n  },\n  email: {\n    type: \"string\",\n    value: \"joedoe@example.com\",\n    required: true\n  },\n  phone_number: {\n    type: \"string\",\n    required: true,\n    value: \"555-555-555\"\n  },\n  id_number: {\n    type: \"number\",\n    required: true,\n    value: 0123456789\n  }\n});\n```\n\nSchema returns an object like so:\n ```js\n {\n  firstname : \"Joe\",\n  lastname : \"Doe\",\n  email : \"joedoe@example.com\",\n  phone_number: \"555-555-555\",\n  id_number: 0123456789\n }\n```\n\nand returns `TypeError` if the supplied value does not match the `type` defined for a `field`. If a `field` is defined with \n`required: false` the `type` for the `field` is also ignored, but if `true` the `field` type is enforced.\n   \n   \n   \n   \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeekage%2Fschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeekage%2Fschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeekage%2Fschema/lists"}