Skip to content

Instantly share code, notes, and snippets.

@alexwilson
Last active January 7, 2017 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexwilson/0ba8042953f22b7d38e9378f856df438 to your computer and use it in GitHub Desktop.
Save alexwilson/0ba8042953f22b7d38e9378f856df438 to your computer and use it in GitHub Desktop.
QuerySelectorAll jQuery-Like Helper
import $$ from '$$'
$$('p').forEach(a => a.innerText = "yolo")
const $$ = (s, c) => [].slice.call((c || document).querySelectorAll(s))
export default $$
{
"name": "queryselectorall-array",
"version": "1.0.0",
"description": "QuerySelectorAll jQuery-Like Helper",
"main": "index.js",
"dependencies": {},
"devDependencies": {},
"author": "Alex Wilson <a@ax.gy> (https://ax.gy)",
"license": "WTFPL"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment