{"id":20936806,"url":"https://github.com/aruntk/html5-utils","last_synced_at":"2025-03-13T03:11:41.195Z","repository":{"id":57267904,"uuid":"79095099","full_name":"aruntk/html5-utils","owner":"aruntk","description":"html5 utils","archived":false,"fork":false,"pushed_at":"2017-01-25T12:46:06.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T08:45:02.091Z","etag":null,"topics":["html5","html5-utils","parse5"],"latest_commit_sha":null,"homepage":"","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/aruntk.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":"2017-01-16T07:48:21.000Z","updated_at":"2017-01-16T11:08:10.000Z","dependencies_parsed_at":"2022-09-02T02:01:59.628Z","dependency_job_id":null,"html_url":"https://github.com/aruntk/html5-utils","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/aruntk%2Fhtml5-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aruntk%2Fhtml5-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aruntk%2Fhtml5-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aruntk%2Fhtml5-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aruntk","download_url":"https://codeload.github.com/aruntk/html5-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330325,"owners_count":20274039,"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":["html5","html5-utils","parse5"],"created_at":"2024-11-18T22:27:06.674Z","updated_at":"2025-03-13T03:11:41.168Z","avatar_url":"https://github.com/aruntk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML5-UTILS\n\nhelper functions to parse and manipulate html5\n\n[![Join the chat at https://gitter.im/aruntk/projects](https://badges.gitter.im/aruntk/projects.svg)](https://gitter.im/aruntk/projects?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Check out the package on npm https://www.npmjs.com/package/html5-utils](https://img.shields.io/npm/v/html5-utils.svg)](https://www.npmjs.com/package/html5-utils)\n\n## Attribute Helpers\n\n### getAttrIndex\n```js\n.getAttrIndex(node, attributeName)\n```\nfirst index of the attribute inside attr array or -1 if attribute is not set\n\n### hasAttr\n```js\n.hasAttr(node, attributeName)\n```\ncheck if attribute is set\n\n\n### getAttr\n```js\n.getAttr(node, attributeName)\n```\nreturns attribute value or null\n\n\n### setAttr\n```js\n.setAttr(node, attributeName, value)\n```\nsets/changes attribute.\n\n\n### removeAttr\n```js\n.removeAttr(node, attributeName)\n```\n\n## TODO\n\n- Create nodes, fragments, comments and shadows\n- Append, prepend, replace, remove, swap operations\n- Query Selector for nodes. Optional Jquery operations also. like cheerio\n- Operations like innerText and innerHTML.\n- Extract contents of link nodes and create curresponsing tags\n- Change tags\n- Ancestors and children helpers\n- Cleaners and minifiers\n- Change value of desired attribute/s\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faruntk%2Fhtml5-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faruntk%2Fhtml5-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faruntk%2Fhtml5-utils/lists"}