{"id":23919580,"url":"https://github.com/benjaminreid/dom","last_synced_at":"2025-07-30T16:11:03.507Z","repository":{"id":46910027,"uuid":"240305080","full_name":"benjaminreid/dom","owner":"benjaminreid","description":"dom aims to be a small and simple module to interact with the DOM.","archived":false,"fork":false,"pushed_at":"2023-01-05T07:15:44.000Z","size":1230,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T14:41:05.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/benjaminreid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-13T16:18:14.000Z","updated_at":"2022-02-03T12:23:17.000Z","dependencies_parsed_at":"2023-02-03T17:32:21.465Z","dependency_job_id":null,"html_url":"https://github.com/benjaminreid/dom","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/benjaminreid/dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminreid%2Fdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminreid%2Fdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminreid%2Fdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminreid%2Fdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjaminreid","download_url":"https://codeload.github.com/benjaminreid/dom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminreid%2Fdom/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259797970,"owners_count":22912766,"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":"2025-01-05T14:53:40.048Z","updated_at":"2025-07-03T15:35:32.771Z","avatar_url":"https://github.com/benjaminreid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dom [![Build Status](https://travis-ci.org/benjaminreid/dom.svg?branch=master)](https://travis-ci.org/benjaminreid/dom) ![File Size](https://img.badgesize.io/benjaminreid/dom/master/src/index.ts?compression=gzip)\n\n`dom` aims to be a small and simple module to interact with the DOM. It has a\ntiny footprint and comes with support for TypeScript. It won’t brew you a coffee\nany time soon but it may save you a few keystrokes.\n\n## Installing\n\nInstall with your package manager of choice.\n\n```\nyarn add @benjaminreid/dom\n```\n\n```\nnpm install @benjaminreid/dom\n```\n\n## Usage\n\n```js\nimport { $, $$ } from \"@benjaminreid/dom\";\n\n// a wrapper around document.querySelector\nconst $element = $(\"#button\");\n\n// a wrapper around document.querySelectorAll\nconst $elements = $$(\".button\");\n\n// except you’ll get an Array back, not a NodeList\n$elements.map($element =\u003e $element.innerText);\n\n// $ and $$ take a second argument so you can select an element withing another\nconst $parent = $(\"#parent\");\nconst $children = $$(\".children\", $parent);\n```\n\n## Tests\n\n`dom` is fully tested with [Jest](https://jestjs.io/) and\n[Testing Library](https://testing-library.com/). You can run them yourself\nwith...\n\n```\nyarn test\n```\n\n```\nnpm test\n```\n\n## Contributing\n\nPull requests are very much welcome. If you have some useful DOM related\nfunctions which you’ve been copying from project to project like me and think\nthey might be at home here, please post your ideas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminreid%2Fdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjaminreid%2Fdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminreid%2Fdom/lists"}