{"id":15400316,"url":"https://github.com/rafaelgss/var-validate","last_synced_at":"2026-01-06T08:43:36.829Z","repository":{"id":35513449,"uuid":"218135031","full_name":"RafaelGSS/var-validate","owner":"RafaelGSS","description":"Just validate some things. :star:","archived":false,"fork":false,"pushed_at":"2022-12-10T07:29:28.000Z","size":81,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T15:49:29.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/RafaelGSS.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}},"created_at":"2019-10-28T20:04:29.000Z","updated_at":"2021-06-10T21:11:14.000Z","dependencies_parsed_at":"2023-01-15T22:31:45.799Z","dependency_job_id":null,"html_url":"https://github.com/RafaelGSS/var-validate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fvar-validate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fvar-validate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fvar-validate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fvar-validate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RafaelGSS","download_url":"https://codeload.github.com/RafaelGSS/var-validate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949238,"owners_count":20698911,"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-01T15:53:31.082Z","updated_at":"2026-01-06T08:43:36.799Z","avatar_url":"https://github.com/RafaelGSS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# var-validate\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n[![Actions Status](https://github.com/RafaelGSS/var-validate/.github/workflows/action.yml/badge.svg)](https://github.com/RafaelGSS/var-validate/actions)\n\nJust validate some things. :star:\n\n## Install\n\n```sh\nnpm i --save var-validate\n```\n\n## Tests\n```sh\nnpm install\nnpm test\n```\n\n## Usage\n\n```js\nconst validate = require('var-validate')\n\nconst inputValid = 'CAR'\nvalidate(inputValid, 'DEFAULT') // CAR\n\nconst inputInvalid = undefined\nvalidate(inputInvalid, 'DEFAULT') // DEFAULT\n\nconst inputEnum = 'BIKE'\nvalidate(inputEnum, 'DEFAULT') // BIKE\nvalidate(inputEnum, 'DEFAULT', { includes: ['CAR', 'AUTO'] }) // DEFAULT\nvalidate(inputEnum, 'DEFAULT', { includes: ['CAR', 'AUTO', 'BIKE'] }) // BIKE\n\nconst inputExcept = 'CAR'\nvalidate(inputExcept, 'DEFAULT', { except: ['BIKE'] }) // CAR\nvalidate(inputExcept, 'DEFAULT', { except: ['BIKE', 'CAR'] }) // DEFAULT\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelgss%2Fvar-validate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaelgss%2Fvar-validate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelgss%2Fvar-validate/lists"}