{"id":15782028,"url":"https://github.com/himanoa/schemaless-validator","last_synced_at":"2025-03-31T16:36:03.228Z","repository":{"id":97525483,"uuid":"360683390","full_name":"himanoa/schemaless-validator","owner":"himanoa","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-28T21:42:11.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T00:37:34.694Z","etag":null,"topics":[],"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/himanoa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-04-22T21:14:20.000Z","updated_at":"2021-04-28T21:42:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"538990ba-e348-41c7-b60e-8cb3dc3d229f","html_url":"https://github.com/himanoa/schemaless-validator","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"544fa2f704f7dba8cd108a9bc28db23390375ea1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanoa%2Fschemaless-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanoa%2Fschemaless-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanoa%2Fschemaless-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanoa%2Fschemaless-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himanoa","download_url":"https://codeload.github.com/himanoa/schemaless-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246498765,"owners_count":20787380,"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":[],"created_at":"2024-10-04T19:02:26.994Z","updated_at":"2025-03-31T16:36:03.206Z","avatar_url":"https://github.com/himanoa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# schemaless-validator\n\nA library for quickly and freedom creating validation \n\n```typescript\nimport { validate } from '@himanoa/schemaless-validator'\n\nconst input = 12\n\nvalidate((assert) =\u003e {\n  assert(input \u003e 13, \"input must be more than 13\")\n  assert(input.toString().length \u003e 13, \"input must be at least 13 characters\")\n}).catch(errors =\u003e {\n  console.dir(errors)\n  /*\n   * console.dir\n   *  [\n   *    'input must be more than 13',\n   *    'input must be at least 13 characters'\n   *  ]\n   *\n   */\n})\n```\n\n## Install\n\n```\nnpm install @himanoa/schemaless-validator\n```\n\nor\n\n```\nyarn add @himanoa/schemaless-validator\n```\n\n## API\n\n### `validate(validator: (assert: (cond: boolean, exceptMessage: string)) =\u003e void): Promise\u003cvoid\u003e`\n\nExecute validator function.\n\nReturn the `Promise.resolve\u003cvoid\u003e` if error array is empty when after execute `validator` and return the `Promise.resolve(exceptMessageArray)` when error is not empty\n\nSee. [test case](https://github.com/himanoa/schemaless-validator/blob/master/src/lib.test.ts#L17-L22)\n\n## LICENSE \n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanoa%2Fschemaless-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimanoa%2Fschemaless-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanoa%2Fschemaless-validator/lists"}