{"id":29780085,"url":"https://github.com/sumeetsarkar/ratifyjs","last_synced_at":"2026-02-13T07:05:45.184Z","repository":{"id":74409151,"uuid":"111960835","full_name":"sumeetsarkar/ratifyjs","owner":"sumeetsarkar","description":"JSON schema validation library","archived":false,"fork":false,"pushed_at":"2018-02-05T11:28:16.000Z","size":25,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-12T22:52:47.133Z","etag":null,"topics":["javascript-library","js","json","json-schema","json-schema-validator","validation"],"latest_commit_sha":null,"homepage":"https://sumeetsarkar.github.io/ratifyjs/","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/sumeetsarkar.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}},"created_at":"2017-11-24T22:49:17.000Z","updated_at":"2023-08-18T22:03:34.000Z","dependencies_parsed_at":"2023-05-29T03:45:21.376Z","dependency_job_id":null,"html_url":"https://github.com/sumeetsarkar/ratifyjs","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"fbd0b304783bc7aa857b2b0fb46278ad629f7edb"},"previous_names":["sumeetsarkar/ratify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sumeetsarkar/ratifyjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumeetsarkar%2Fratifyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumeetsarkar%2Fratifyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumeetsarkar%2Fratifyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumeetsarkar%2Fratifyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumeetsarkar","download_url":"https://codeload.github.com/sumeetsarkar/ratifyjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumeetsarkar%2Fratifyjs/sbom","scorecard":{"id":858222,"data":{"date":"2025-08-11","repo":{"name":"github.com/sumeetsarkar/ratifyjs","commit":"fbd0b304783bc7aa857b2b0fb46278ad629f7edb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T00:29:31.456Z","repository_id":74409151,"created_at":"2025-08-24T00:29:31.456Z","updated_at":"2025-08-24T00:29:31.456Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28552111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript-library","js","json","json-schema","json-schema-validator","validation"],"created_at":"2025-07-27T13:18:12.208Z","updated_at":"2026-02-13T07:05:45.178Z","avatar_url":"https://github.com/sumeetsarkar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ratify JS\n\n\u003e Ratify JS is a fast \u0026 small JSON schema validation library\n\n### Installation\n    npm install ratify-js\n\n\n### Apply Schema on Data\n\n```js\nconst { ratify } = require('ratify-js');\n\n// Usage 1 - direct approach\nratify(schema, data);\n\n// Usage 2 - curried approach\nconst schemaValidator = ratify(schema);\nschemaValidator(data);\n```\n\n\n### Define schema\n\n```js\nconst { Types, } = require('ratify-js');\n\nmodule.exports = {\n  type: Types.Object, /* Main Parent type: Object or Array */\n  fields: { /* fields of Object */\n    id: {\n      type: Types.Number, /* type: Number */\n      required: true, /* Required: true, or else considered false */\n    },\n    firstName: {\n      type: Types.String, /* type: String */\n      required: true,\n      test: /^[a-zA-Z]{2,12}/,  /* test: assign regex */\n    },\n    lastName: {\n      type: Types.String,\n      default: '',  /* default assignment, only if Required: false */\n    },\n    age: {\n      type: Types.Number,\n      required: true,\n      range: {  /* Assign range -\u003e min, max (for type: Number) */\n        min: 18,\n      },\n    },\n    hobbies: {\n      type: Types.Array,  /* Type: Array */\n      length: { /* Assign length -\u003e min, max (for type: Array) */\n        min: 1,\n        max: 5,\n      },\n      children: { /* chilren of array */\n        type: Types.String,\n      },\n    },\n    sports: {\n      type: Types.Array,\n      default: [],  /* default assignment for array */\n      children: {\n        type: Types.String,\n      },\n    },\n    address: {\n      type: Types.Object, /* type: Object */\n      fields: {\n        street: {\n          type: Types.String,\n          required: true,\n        },\n        city: {\n          type: Types.String,\n          required: true,\n        },\n        state: {\n          type: Types.String,\n          required: true,\n        },\n        pin: {\n          type: Types.String,\n        },\n      },\n    },\n  },\n};\n\n```\n\n### A sample JSON conforming to the above schema\n\n```js\nmodule.exports = {\n  id: 123456,\n  firstName: 'John',\n  lastName: 'Doe',\n  age: 25,\n  hobbies: ['reading', 'cinema'],\n  sports: ['volley-ball', 'badminton'],\n  address: {\n    street: '890 Fifth Avenue, Manhattan',\n    city: 'New York City',\n    state: 'New York',\n    pin: '',\n  },\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumeetsarkar%2Fratifyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumeetsarkar%2Fratifyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumeetsarkar%2Fratifyjs/lists"}