{"id":27953584,"url":"https://github.com/boostio/ow-my-class","last_synced_at":"2025-05-07T17:13:53.025Z","repository":{"id":57317192,"uuid":"189501316","full_name":"BoostIO/ow-my-class","owner":"BoostIO","description":"Validate a plain object with a class and make it type-safe!","archived":false,"fork":false,"pushed_at":"2019-05-31T08:01:20.000Z","size":15,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T17:13:49.079Z","etag":null,"topics":["ow","typescript","validator"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/BoostIO.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":"2019-05-31T00:38:45.000Z","updated_at":"2019-07-15T07:30:32.000Z","dependencies_parsed_at":"2022-08-25T21:11:40.467Z","dependency_job_id":null,"html_url":"https://github.com/BoostIO/ow-my-class","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostIO%2Fow-my-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostIO%2Fow-my-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostIO%2Fow-my-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostIO%2Fow-my-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoostIO","download_url":"https://codeload.github.com/BoostIO/ow-my-class/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922335,"owners_count":21825639,"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":["ow","typescript","validator"],"created_at":"2025-05-07T17:13:52.361Z","updated_at":"2025-05-07T17:13:53.018Z","avatar_url":"https://github.com/BoostIO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ow-my-class`\n\nValidate a plain object with a class and make it type-safe!\n\n[![Build Status](https://travis-ci.com/BoostIO/ow-my-class.svg?branch=master)](https://travis-ci.com/BoostIO/ow-my-class)\n[![codecov](https://codecov.io/gh/BoostIO/ow-my-class/branch/master/graph/badge.svg)](https://codecov.io/gh/BoostIO/ow-my-class)\n[![NPM download](https://img.shields.io/npm/dm/ow-my-class.svg)](https://www.npmjs.com/package/prismy)\n[![Supported by BoostIO](https://github.com/BoostIO/boostio-materials/raw/master/v1/boostio-shield-v1.svg?sanitize=true)](https://boostio.co)\n\n## Usage\n\n```sh\nnpm i ow ow-my-class\n```\n\n```ts\nimport Omc from 'ow-my-class'\nimport ow from 'ow'\n\nclass User {\n  @Omc(ow.string.minLength(5))\n  name: string\n}\n\n// Return false\nconst result = Omc.isValid(\n  {\n    name: 'yolo'\n  },\n  User\n)\n\n// Throw ValidationError\nOmc.validate(\n  {\n    name: 'yolo'\n  },\n  User\n)\n\n// Convert a plain object into a User instance\nconst user = Omc.transform(\n  {\n    name: 'yolo yolo'\n  },\n  User\n)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboostio%2Fow-my-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboostio%2Fow-my-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboostio%2Fow-my-class/lists"}