Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptex committed Mar 9, 2018
1 parent 8c5c524 commit f462fa2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# dom-helpers

Helper functions for faster DOM scripting

## Install

```
yarn add @three11/dom-helpers
```

or

```
npm i @three11/dom-helpers
```

## Usage

```
import * as helpers from '@three11/dom-helpers';
```

or

Import each function separately.

See functions list below.

## Functions

* `byID` - retrieves an element by ID
* `single` - retrieves an element by a given valid css selector
* `multi` - retrieves a collection of elements and normalizes the return value
* `addListener` - attaches an event listener to element

0 comments on commit f462fa2

Please sign in to comment.