{"id":18602444,"url":"https://github.com/softstack/joi-bigint","last_synced_at":"2025-05-16T17:34:43.440Z","repository":{"id":185384515,"uuid":"673361746","full_name":"softstack/joi-bigint","owner":"softstack","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-04T18:53:51.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T12:56:20.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/softstack.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":"2023-08-01T13:06:07.000Z","updated_at":"2023-08-01T13:53:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5fce8fb-9351-49f4-84fc-55648121165d","html_url":"https://github.com/softstack/joi-bigint","commit_stats":null,"previous_names":["softstackhq/joi-bigint","softstack/joi-bigint"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softstack%2Fjoi-bigint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softstack%2Fjoi-bigint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softstack%2Fjoi-bigint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softstack%2Fjoi-bigint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softstack","download_url":"https://codeload.github.com/softstack/joi-bigint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254576937,"owners_count":22094484,"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-11-07T02:11:23.804Z","updated_at":"2025-05-16T17:34:43.421Z","avatar_url":"https://github.com/softstack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# joi-bigint\n\nJoi extension for bigint\n\n## Features\n\n- Converts number and string.\n- The supported rules are: greater, less, max, min, multiple, negative, port, positive and sign\n\n## Usage\n\n```typescript\nimport BaseJoi from 'joi';\nimport { extendJoi } from '@softstack/joi-bigint';\n\nconst Joi = extendJoi(BaseJoi);\nconst schema = Joi.bigint().min(3n).required();\n\nconst result1 = schema.validate(3n);\nconsole.log(result1);\n// { value: 3n }\n\nconst result2 = schema.validate(3);\nconsole.log(result2);\n// { value: 3n }\n\nconst result3 = schema.validate('3');\nconsole.log(result3);\n// { value: 3n }\n\nconst result4 = schema.validate(123.456);\nconsole.log(result4);\n// {\n//   value: 123.456,\n//   error: [Error [ValidationError]: \"value\" must be a bigint] {\n//     _original: 123.456,\n//     details: [ [Object] ]\n//   }\n// }\n\nconst result5 = schema.validate(2n);\nconsole.log(result5);\n// {\n//   value: 2n,\n//   error: [Error [ValidationError]: \"value\" must be greater than or equal to 3] {\n//     _original: 2n,\n//     details: [ [Object] ]\n//   }\n// }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftstack%2Fjoi-bigint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftstack%2Fjoi-bigint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftstack%2Fjoi-bigint/lists"}