Skip to content

Commit f462fa2

Browse files
committed
Add README
1 parent 8c5c524 commit f462fa2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
# dom-helpers
2+
23
Helper functions for faster DOM scripting
4+
5+
## Install
6+
7+
```
8+
yarn add @three11/dom-helpers
9+
```
10+
11+
or
12+
13+
```
14+
npm i @three11/dom-helpers
15+
```
16+
17+
## Usage
18+
19+
```
20+
import * as helpers from '@three11/dom-helpers';
21+
```
22+
23+
or
24+
25+
Import each function separately.
26+
27+
See functions list below.
28+
29+
## Functions
30+
31+
* `byID` - retrieves an element by ID
32+
* `single` - retrieves an element by a given valid css selector
33+
* `multi` - retrieves a collection of elements and normalizes the return value
34+
* `addListener` - attaches an event listener to element

0 commit comments

Comments
 (0)