{"id":13658653,"url":"https://github.com/sylvainpolletvillard/ObjectModel","last_synced_at":"2025-04-24T11:32:35.778Z","repository":{"id":25664131,"uuid":"29099794","full_name":"sylvainpolletvillard/ObjectModel","owner":"sylvainpolletvillard","description":"Strong Dynamically Typed Object Modeling for JavaScript","archived":false,"fork":false,"pushed_at":"2024-09-26T01:30:32.000Z","size":5553,"stargazers_count":472,"open_issues_count":5,"forks_count":28,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-16T09:31:00.266Z","etag":null,"topics":["composition","dynamic","javascript","model","strong","structure","type-checking","typing"],"latest_commit_sha":null,"homepage":"http://objectmodel.js.org","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/sylvainpolletvillard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-11T17:37:57.000Z","updated_at":"2025-04-14T08:54:30.000Z","dependencies_parsed_at":"2024-06-16T11:54:44.974Z","dependency_job_id":"5f463744-4cb0-4dd7-b4f3-e019dee03c1c","html_url":"https://github.com/sylvainpolletvillard/ObjectModel","commit_stats":{"total_commits":829,"total_committers":10,"mean_commits":82.9,"dds":0.0579010856453559,"last_synced_commit":"2c1b22394a5f0e1a9add756c26b912a1c0ea0b1c"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvainpolletvillard%2FObjectModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvainpolletvillard%2FObjectModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvainpolletvillard%2FObjectModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvainpolletvillard%2FObjectModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylvainpolletvillard","download_url":"https://codeload.github.com/sylvainpolletvillard/ObjectModel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250618587,"owners_count":21460120,"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":["composition","dynamic","javascript","model","strong","structure","type-checking","typing"],"created_at":"2024-08-02T05:01:01.430Z","updated_at":"2025-04-24T11:32:35.169Z","avatar_url":"https://github.com/sylvainpolletvillard.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"http://objectmodel.js.org\" target=\"_blank\"\u003e\u003cimg width=\"400\" src=\"http://objectmodel.js.org/docs/res/logo.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eStrong Dynamically Typed Object Modeling for JavaScript\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/objectmodel\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/objectmodel.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/objectmodel\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/objectmodel.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/sylvainpolletvillard/ObjectModel\"\u003e\u003cimg src=\"https://travis-ci.org/sylvainpolletvillard/ObjectModel.svg?branch=master\" alt=\"Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/objectmodel\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/objectmodel.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## What is this library ?\n   \n  ObjectModel intends to bring **strong dynamic type checking** to your web applications. Contrary to static type-checking solutions like [TypeScript] or [Flow], ObjectModel can also validate data at runtime: JSON from the server, form inputs, content from localStorage, external libraries...\n  \n  By leveraging **ES6 Proxies**, this library ensures that your variables always match the model definition and validation constraints you added to them. Thanks to the generated exceptions, it will help you spot potential bugs and save you time spent on debugging. ObjectModel is also very easy to master: *no new language to learn, no new tools, no compilation step, just a minimalist and intuitive API in a plain old JS micro-library*.\n  \n  Validating at runtime also brings many other benefits: you can define your own types, use them in complex model definitions with custom assertions that can even change depending on your application state. Actually it goes much further than just type safety. Go on and see for yourself.\n\n## Installation\nAdd the library to your project dependencies with NPM:\n```bash\n$ npm install objectmodel\n```\n\nor just [download the library from Github][github-releases]\n\n## Basic usage example\n\n```javascript\nimport { ObjectModel } from \"objectmodel\"\n\nconst Order = new ObjectModel({\n\tproduct: { name: String, quantity: Number },\n\torderDate: Date\n});\n\nconst myOrder = new Order({\n\tproduct: { name: \"Apple Pie\", quantity: 1 },\n\torderDate: new Date()\n});\n\nmyOrder.product.quantity = 2; // no exceptions thrown\nmyOrder.product.quantity = false; //try to assign a Boolean\n// ❌ TypeError: expecting product.quantity to be Number, got Boolean false\n```\n\n## Documentation\n\nFor more examples, documentation and questions, please refer to the project website: [objectmodel.js.org][website]\n\n## Changelog and Release History\n\nPlease refer to [Github Releases][github-releases]\n\n*Bug reports and pull requests are welcome.*\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[website]:http://objectmodel.js.org\n[TypeScript]:https://www.typescriptlang.org/\n[Flow]:https://flowtype.org/\n[github-releases]:https://github.com/sylvainpolletvillard/ObjectModel/releases\n[npm-url]: https://npmjs.org/package/objectmodel\n[npm-image]: https://img.shields.io/npm/v/objectmodel.svg\n[npm-downloads]: https://img.shields.io/npm/dm/objectmodel.svg\n[license-badge]:https://img.shields.io/badge/license-MIT-blue.svg","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvainpolletvillard%2FObjectModel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylvainpolletvillard%2FObjectModel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvainpolletvillard%2FObjectModel/lists"}