{"id":22093195,"url":"https://github.com/iadvize/javascript-jsonapi-model-library","last_synced_at":"2025-10-06T03:31:55.501Z","repository":{"id":57279626,"uuid":"49566562","full_name":"iadvize/javascript-jsonapi-model-library","owner":"iadvize","description":"Provide base model to deal with jsonapi models","archived":false,"fork":false,"pushed_at":"2018-03-01T13:18:43.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":45,"default_branch":"master","last_synced_at":"2025-07-11T11:52:20.560Z","etag":null,"topics":["jsonapi","jsonapi-models","models"],"latest_commit_sha":null,"homepage":"","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/iadvize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2016-01-13T10:22:31.000Z","updated_at":"2018-03-01T13:19:25.000Z","dependencies_parsed_at":"2022-08-30T02:41:41.295Z","dependency_job_id":null,"html_url":"https://github.com/iadvize/javascript-jsonapi-model-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iadvize/javascript-jsonapi-model-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iadvize%2Fjavascript-jsonapi-model-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iadvize%2Fjavascript-jsonapi-model-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iadvize%2Fjavascript-jsonapi-model-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iadvize%2Fjavascript-jsonapi-model-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iadvize","download_url":"https://codeload.github.com/iadvize/javascript-jsonapi-model-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iadvize%2Fjavascript-jsonapi-model-library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266608969,"owners_count":23955545,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jsonapi","jsonapi-models","models"],"created_at":"2024-12-01T03:13:15.951Z","updated_at":"2025-10-06T03:31:50.464Z","avatar_url":"https://github.com/iadvize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"javascript-jsonapi-model-library [![Build Status][circle-image]][circle-url] [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url]\n================================\n\n\u003e Provide base model to deal with jsonapi models\n\n## Examples\n\n## Install\n\n```sh\n$ npm install --save javascript-jsonapi-model-library\n```\n\n## Documentation\n\n### Usage\n\n```js\nimport Model from 'javascript-jsonapi-model-library';\nconst schema = 'a json-schema';\n\nclass Profile extends Model {\n    constructor(values) {\n        super(values, schema);\n\n        this.setJsonConfig({\n            attributes: ['name', 'email']\n        });\n    }\n}\n\nlet profile = new Profile({name: 'Simon', email: 'email@example.com', state: 'approved'});\n\nassert(profile.get('name') === 'Simon');\n\ntry {\n    profile.validate();\n\n    reply(profile.toJson());\n} catch (e) {\n    // deal with error\n}\n```\n\n## Contribute\n\nLook at contribution guidelines here : [CONTRIBUTING.md](CONTRIBUTING.md)\n\n[npm-image]: https://badge.fury.io/js/javascript-jsonapi-model-library.svg\n[npm-url]: https://npmjs.org/package/javascript-jsonapi-model-library\n[circle-image]: https://circleci.com/gh/iadvize/javascript-jsonapi-model-library.svg?style=svg\n[circle-url]: https://circleci.com/gh/iadvize/javascript-jsonapi-model-library\n[daviddm-image]: https://david-dm.org/iAdvize/javascript-jsonapi-model-library.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/iAdvize/javascript-jsonapi-model-library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiadvize%2Fjavascript-jsonapi-model-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiadvize%2Fjavascript-jsonapi-model-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiadvize%2Fjavascript-jsonapi-model-library/lists"}