{"id":14984956,"url":"https://github.com/dbushell/jsonlike","last_synced_at":"2025-04-10T23:14:07.899Z","repository":{"id":249658398,"uuid":"832132642","full_name":"dbushell/jsonlike","owner":"dbushell","description":"🍋‍🟩 Just enough JavaScript object validation","archived":false,"fork":false,"pushed_at":"2024-10-25T06:39:10.000Z","size":14,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:13:58.418Z","etag":null,"topics":["bun","deno","javascript","json","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dbushell.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":"2024-07-22T12:17:21.000Z","updated_at":"2024-10-25T06:39:13.000Z","dependencies_parsed_at":"2024-09-29T18:40:43.579Z","dependency_job_id":"ca67180a-a09f-4ef7-b517-26a1ad243896","html_url":"https://github.com/dbushell/jsonlike","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"63d554422b7ce3e81e40f45ea462d29bf51e66bc"},"previous_names":["dbushell/jsonlike"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fjsonlike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fjsonlike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fjsonlike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fjsonlike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbushell","download_url":"https://codeload.github.com/dbushell/jsonlike/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312135,"owners_count":21082638,"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":["bun","deno","javascript","json","nodejs","typescript"],"created_at":"2024-09-24T14:09:55.146Z","updated_at":"2025-04-10T23:14:07.879Z","avatar_url":"https://github.com/dbushell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍋‍🟩 jsonlike\n\n[![JSR](https://jsr.io/badges/@dbushell/jsonlike?labelColor=98e6c8\u0026color=333)](https://jsr.io/@dbushell/jsonlike) [![NPM](https://img.shields.io/npm/v/@dbushell/jsonlike?labelColor=98e6c8\u0026color=333)](https://www.npmjs.com/package/@dbushell/jsonlike)\n\nJust enough JavaScript object validation.\n\n**jsonlike** is a tiny \u003c 1kB library used to validate JavaScript objects against a JSON-like schema.\n\nIt can:\n\n* Match properties by primitive types\n* Match arrays of single type values\n* Match nested objects\n\n## Usage\n\n```ts\nimport {jsonlike} from '@dbushell/jsonlike';\n\nconst json = JSON.parse(`{\n  \"greeting\": \"Hello, World!\",\n  \"items\": [{\"id\": 1}, {\"id\": 2}, {\"id\": 3}]\n}`);\n\nconst valid = jsonlike(json, {\n  greeting: 'string',\n  items: [{id: 'number'}]\n});\n```\n\n## Notes\n\nUse [Ajv](https://github.com/ajv-validator/ajv) or [Zod](https://github.com/colinhacks/zod) for full schema validation.\n\n* * *\n\n[MIT License](/LICENSE) | Copyright © 2024 [David Bushell](https://dbushell.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbushell%2Fjsonlike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbushell%2Fjsonlike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbushell%2Fjsonlike/lists"}