{"id":36772497,"url":"https://github.com/wassimbj/itiz","last_synced_at":"2026-01-12T13:06:04.117Z","repository":{"id":57278512,"uuid":"254732262","full_name":"wassimbj/itiz","owner":"wassimbj","description":"well tested, and easy to use js validation library","archived":false,"fork":false,"pushed_at":"2020-05-02T15:53:13.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T02:24:38.589Z","etag":null,"topics":["browser","javascript","server","utils","validation"],"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/wassimbj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-10T20:42:28.000Z","updated_at":"2020-05-02T15:53:15.000Z","dependencies_parsed_at":"2022-09-18T12:41:02.885Z","dependency_job_id":null,"html_url":"https://github.com/wassimbj/itiz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wassimbj/itiz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimbj%2Fitiz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimbj%2Fitiz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimbj%2Fitiz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimbj%2Fitiz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wassimbj","download_url":"https://codeload.github.com/wassimbj/itiz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimbj%2Fitiz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["browser","javascript","server","utils","validation"],"created_at":"2026-01-12T13:06:03.269Z","updated_at":"2026-01-12T13:06:04.110Z","avatar_url":"https://github.com/wassimbj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is this ?\nthis is a **js validation library**, works on the browser as well as on the server, it is well tested with the help of QUnit.\nhope you find it helpful.\n\n## On the Browser:\nif you want to use \"itiz\" on the browser, just download and then load the itiz.min.js file.\n\n```js\n    \u003cscript src='./your_project/path/to/itiz.min.js'\u003e\u003c/script\u003e \n```\n\n## On the Server:\nif you are using some server side js frameworks like Nodejs, you just need to npm install it\n```\n    npm i itiz \n```\nand the simply require it as you do with any other package\n\n\n## API \u0026 Usage\n\n## itiz(param)\nthis is the main function, this will return an object of all the helpful methods that you can use.\u003c/br\u003e\n**param is required, you will get an error if you dont pass anything**\u003c/br\u003e\nthose are the methods you get after calling itiz() with params;\n\n### .email()\nthis method will validate the email you pass to the itiz() function \u003c/br\u003e\n**usage**\n```js\n    // this here will return an object (wich is a chain of all the other method,\n    // or false if the email is not valid\n    itiz('example.email@mail.com').email();\n```\n\n### .length(params)\nthis method will validate the string you give to the itiz() function \u003c/br\u003e\n**usage**\n```js\n\n    // will return an object (wich is a chain of all the other method or false if itiz not valid\n    itiz('this is a long string').length({max: 20});\n\n```\n\n**params** \u003c/br\u003e\nparameters are required, and it must be an object that has one of this:\n\u003c/br\u003e **min**: the minimum length of the string\n\u003c/br\u003e **max**: the maximum length of the string\n\n### .same()\nthis method will ensure if two (or more) values are the same (equal)\n**usage**\n```js\n    // this will return an object (wich is a chain of all the other method or false if the two values are not the same\n    itiz(['password_123', 'password_123']).same();\n\n    // You can pass as many values as you can to check if they are all the same\n    // e.g:\n    itiz(['doe', 'doe', 'doe', 'doe']).same();\n```\n\n### .url([params])\nthis method here will validate if a given url is valid \u003c/br\u003e\n**usage**\n```js\n\n    // this will return an object (wich is a chain of all the other method or false if the two values are not the same\n    itiz('www.facebook.com').url();\n\n```\n\n**params** \u003c/br\u003e\nthis method accepts one parameter wich is a boolean value (default is false).\nif you pass true to it, it will ensure that that the url must contain the protocol (http/https)\n```js\n    // e.g:\n    itiz('www.google.com').url(true) // this will return false\n```\n\n### .contains(params)\nthis method will validate if a **string or array** contains a specific value; \u003c/br\u003e\n***this method will return only boolean value (true/false), it wont return an object*** \u003c/br\u003e\n\n**usage**\n```js\n    \n    // with strings\n    itiz('i love harry potter').contains('potter') // will return true\n\n    // with arrays\n    itiz(['harry', 'ron', 'hermione']).contains('voldemort') // will return false\n\n```\n\n### .notEmpty()\nthis method will validate if an array/object/string is not empty\n***it will return an object if valid or false if not*** \u003c/br\u003e\n\n**usage**\n```js\n\n    itiz(['harry', 'ron', 'hermione']).notEmpty() // will return an object with the other helpful methods\n    \n    itiz({}).notEmpty() // will return an false, well cause its empty\n\n```\n\n\n### .empty()\nthis method will validate if an array/object/string is empty\n***it will return an object if valid or false if not*** \u003c/br\u003e\n\n**usage**\n```js\n\n    itiz({name: 'hagrid'}).empty() // will return false\n\n    itiz([]).empty() // will return an object with the other helpful methods\n\n```\n\n\n### .upperCase([params])\nthis method will validate if an a string is upper case \n***it will return an object if valid or false if not*** \u003c/br\u003e\n\n**usage**\n```js\n\n    itiz('HELLO WORLD').upperCase() // will return an object\n\n    itiz('HELLO WOrLD').upperCase() // will return false\n\n```\n\n**params** \u003c/br\u003e\nthis method accepts one **optional** parameter wich is an object with an index property,\u003c/br\u003e\nthat can be a number or array of numbers. **this parameter will ensure that the index given is upper-case**\n\n```js\n    // e.g:\n    itiz('Hello world').upperCase({index: 0}) // will return an object, cause its valid :)\n```\n\n### .lowerCase([params])\nthis method will validate if an a string is lower case \n***it will return an object if valid or false if not*** \u003c/br\u003e\n\n**usage**\n```js\n\n    itiz('chamber of secrets').lowerCase() // will return an object\n\n    itiz('Philosopher stone').lowerCase() // will return false\n\n```\n\n**params** \u003c/br\u003e\nthis method accepts one **optional** parameter wich is an object with an index property, same as the upperCase() method, \nthat can be a number or array of numbers.\n\n```js\n    // e.g:\n    itiz('Magic Wand').lowerCase({index: 2}) // will return an object, cause its valid :)\n```\n\n# Contribution\nif you found this library helpful and you want to contribute, maybe add another helpful method or anything..., please go ahead.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassimbj%2Fitiz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwassimbj%2Fitiz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassimbj%2Fitiz/lists"}