{"id":18563943,"url":"https://github.com/rbrtsmith/native-dom-helpers","last_synced_at":"2025-05-15T18:14:15.641Z","repository":{"id":87697088,"uuid":"43349365","full_name":"rbrtsmith/native-dom-helpers","owner":"rbrtsmith","description":"A collection of helper functions for interacting with the native DOM","archived":false,"fork":false,"pushed_at":"2015-09-29T07:46:40.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T13:12:53.410Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbrtsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-29T06:31:22.000Z","updated_at":"2015-09-29T07:23:06.000Z","dependencies_parsed_at":"2023-03-07T09:30:17.543Z","dependency_job_id":null,"html_url":"https://github.com/rbrtsmith/native-dom-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrtsmith%2Fnative-dom-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrtsmith%2Fnative-dom-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrtsmith%2Fnative-dom-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrtsmith%2Fnative-dom-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbrtsmith","download_url":"https://codeload.github.com/rbrtsmith/native-dom-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394726,"owners_count":22063984,"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-06T22:13:53.943Z","updated_at":"2025-05-15T18:14:15.620Z","avatar_url":"https://github.com/rbrtsmith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Native DOM helpers\nA collection of helper functions for interacting with the native DOM\n\n##hasClass##\n Takes a DOM element node and a string.  It returns true if the string was found on the className attribute, otherwise returns false.  \n`hasClass(document.querySelector('#id), 'foo');`\n\n##addClass##\n Takes a single DOM element, or a collection and a string.  It appends the supplied string to the className attribute if not already present on each node in the collection.  \n`addClass(document.querySelector('#id), 'foo');`  \n**Dependencies**  \n  * hasClass\n\n##removeClass##\nTakes a single DOM element or a collection and a string.  It removes the supplied string from the className attribute if it exists for each node in the collection.  \n`removeClass(document.querySelector('#id), 'foo');`  \n**Dependencies**  \n  * hasClass\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrtsmith%2Fnative-dom-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbrtsmith%2Fnative-dom-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrtsmith%2Fnative-dom-helpers/lists"}