{"id":16941381,"url":"https://github.com/francoischalifour/selectors-to-array","last_synced_at":"2026-05-04T22:39:01.651Z","repository":{"id":65493813,"uuid":"64595704","full_name":"francoischalifour/selectors-to-array","owner":"francoischalifour","description":"Converts CSS selectors, DOM elements and NodeLists into arrays","archived":false,"fork":false,"pushed_at":"2016-07-31T15:04:50.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T22:04:42.628Z","etag":null,"topics":["array","css-selector","dom-element","javascript","nodelist","selector"],"latest_commit_sha":null,"homepage":"https://npm.im/selectors-to-array","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/francoischalifour.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}},"created_at":"2016-07-31T13:40:58.000Z","updated_at":"2024-10-10T23:25:52.000Z","dependencies_parsed_at":"2023-01-25T21:15:18.045Z","dependency_job_id":null,"html_url":"https://github.com/francoischalifour/selectors-to-array","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/francoischalifour/selectors-to-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoischalifour%2Fselectors-to-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoischalifour%2Fselectors-to-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoischalifour%2Fselectors-to-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoischalifour%2Fselectors-to-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francoischalifour","download_url":"https://codeload.github.com/francoischalifour/selectors-to-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoischalifour%2Fselectors-to-array/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265151230,"owners_count":23719118,"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":["array","css-selector","dom-element","javascript","nodelist","selector"],"created_at":"2024-10-13T21:09:23.889Z","updated_at":"2026-05-04T22:39:01.607Z","avatar_url":"https://github.com/francoischalifour.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# selectors-to-array\n\n\u003e Converts [CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors), [DOM elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) and [NodeLists](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) into arrays\n\n## Install\n\n```console\n$ npm install --save selectors-to-array\n```\n\n## Usage\n\n```js\nconst selectorsToArray = require('selectors-to-array')\n\nselectorsToArray('input, button')\n// =\u003e [input#player-1, input#player-2, button]\n\nselectorsToArray(document.querySelector('input'))\n// =\u003e [input#player-1]\n\nselectorsToArray(document.querySelectorAll('input'))\n// =\u003e [input#player-1, input#player-2]\n\nconst elements = [\n  document.querySelector('#player-1'),\n  ...document.querySelectorAll('button')\n]\nselectorsToArray(elements)\n// =\u003e [input#player-1, button]\n```\n\n## License\n\nMIT © [François Chalifour](http://francoischalifour.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancoischalifour%2Fselectors-to-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancoischalifour%2Fselectors-to-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancoischalifour%2Fselectors-to-array/lists"}