1.0.0 • Published 5 years ago

getelementsbyid v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

getElementsById

A simple library for selecting multiple elements by id.

This function slightly resembles document.getElementById except you can pass indefinite number of ids and function returns an array with your selected elements.

Also works seamlessly with array destructuring.

Basic example with array destructuring

import getElementsById from "getelementsbyid";

const [nav, article] = getElementsById("nav", "article");