qs2el
Version:
Create elements from query selector strings.
15 lines (9 loc) • 565 B
Markdown
# qs2el
[](https://travis-ci.com/WebReflection/qs2el) [](https://coveralls.io/github/WebReflection/qs2el?branch=master) 
Create an element from a query selector string.
```js
// as function
const a = qs2el('a#home.special[data-page=home]');
// or as literal
const button = qs2el`button${'.primary'}[disabled]`;
```