{"id":17718895,"url":"https://github.com/kvnol/input-filter","last_synced_at":"2025-03-14T03:33:19.714Z","repository":{"id":120782712,"uuid":"123708786","full_name":"kvnol/input-filter","owner":"kvnol","description":"A tiny library for filtering content based in the input value.","archived":false,"fork":false,"pushed_at":"2018-03-05T17:46:44.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-07T04:47:55.035Z","etag":null,"topics":["filter","javascript","tiny-library"],"latest_commit_sha":null,"homepage":"","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/kvnol.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-03T16:16:44.000Z","updated_at":"2018-07-04T15:42:42.000Z","dependencies_parsed_at":"2024-08-15T08:20:09.186Z","dependency_job_id":null,"html_url":"https://github.com/kvnol/input-filter","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvnol%2Finput-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvnol%2Finput-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvnol%2Finput-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvnol%2Finput-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvnol","download_url":"https://codeload.github.com/kvnol/input-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243520689,"owners_count":20304173,"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":["filter","javascript","tiny-library"],"created_at":"2024-10-25T14:58:25.760Z","updated_at":"2025-03-14T03:33:19.700Z","avatar_url":"https://github.com/kvnol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Input Filter\n\nA tiny library for filtering content based in the input value.\n\n## Sumary\n\n- [Configuration](#configuration)\n  - [Select filter](#select-filter)\n- [Options](#options)\n  - [hasSiblings](#hassiblings)\n- [TODO](#to-do)\n- [License](#license)\n\n## Configuration\n\n### Select filter\n\nConfigure the select filter using `[data-type=\"select\"]` on the `\u003cselect\u003e` tag:\n\n```html\n\u003cselect class=\"filter-select\" data-type=\"select\"\u003e\n  \u003coption value=\"\"\u003eFilter\u003c/option\u003e\n  \u003coption value=\"red\"\u003eRed\u003c/option\u003e\n  \u003coption value=\"green\"\u003eGreen\u003c/option\u003e\n  \u003coption value=\"blue\"\u003eBlue\u003c/option\u003e\n\u003c/select\u003e\n```\n\nAnd the items that will be filtered with `data-type=\"filter-item\"` and `data-value=\"\"`:\n\n```html\n\u003cdiv class=\"content\"\u003e\n  \u003cdiv class=\"item red\" data-type=\"filter-item\" data-value=\"red\"\u003e\u003c/div\u003e\n  \u003cdiv class=\"item green\" data-type=\"filter-item\" data-value=\"green\"\u003e\u003c/div\u003e\n  \u003cdiv class=\"item blue\" data-type=\"filter-item\" data-value=\"blue\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\nInitialize the filter call the `filter` function:\n\n```javascript\n\u003cscript\u003e\nfilter('[data-type=\"select\"]', false);\n\u003c/script\u003e\n```\n\n#### [View the example here](https://codepen.io/kvnol/pen/vdqYYE)\n\n## Options\n\nThe input filter has some options:\n\n#### hasSiblings\n\nThe `hasSiblings` is a boolean option to filter with more than one `\u003cselect\u003e`.\n\n```javascript\n\u003cscript\u003e\nfilter('[data-type=\"select\"]', hasSiblings);\n\u003c/script\u003e\n```\n\n## TODO\n\n- [x] Create filter for select input\n- [ ] Create filter for text input\n- [ ] Remove libDOM dependency\n- [ ] Publish on NPM\n\n## License\n\nKevin Oliveira \u0026copy; MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvnol%2Finput-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvnol%2Finput-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvnol%2Finput-filter/lists"}