Skip to content

Commit

Permalink
use lower case for ldquery name
Browse files Browse the repository at this point in the history
  • Loading branch information
zbryikt committed Jan 19, 2021
1 parent a363d03 commit 9d37127
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ldQuery
# ldquery

lightweight DOM Helpers in Vanilla JS.

Expand All @@ -11,23 +11,23 @@ install via npm:

or, download it from github:

https://github.com/loadingio/ldQuery/releases/latest/download/ldq.js
https://github.com/loadingio/ldQuery/releases/latest/download/ldq.min.js
https://github.com/loadingio/ldquery/releases/latest/download/ldq.js
https://github.com/loadingio/ldquery/releases/latest/download/ldq.min.js

or use it directly via CDN:

https://cdn.jsdelivr.net/gh/loadingio/ldQuery@v1.0.0/dist/ldq.js
https://cdn.jsdelivr.net/gh/loadingio/ldQuery@v1.0.0/dist/ldq.min.js
https://cdn.jsdelivr.net/gh/loadingio/ldquery@v1.1.3/dist/ldq.js
https://cdn.jsdelivr.net/gh/loadingio/ldquery@v1.1.3/dist/ldq.min.js


in you html, include it directly with `<script>` tag:

<script src="https://cdn.jsdelivr.net/gh/loadingio/ldQuery@v1.0.0/dist/ldq.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/loadingio/ldquery@v1.1.3/dist/ldq.min.js"></script>


## Usage

ldQuery provides following functions:
ldquery provides following functions:

* find(node, selector, index):
shorthand for querySelector and querySelectorAll. return array when index is omitted.
Expand Down Expand Up @@ -76,7 +76,7 @@ This could be enabled by remove the comment mark in corresponding line inside ld

## Fetch

ldQuery wraps fetch api with promise-based error handling and some additional parameter.
ldquery wraps fetch api with promise-based error handling and some additional parameter.

`
ld$.fetch(<URL>, <RAWOPTION>, <LDQOPTION>)
Expand All @@ -91,7 +91,7 @@ Common raw options:
- `ld$.fetch "url", {body: JSON.stringify({data: 1})}`
* headers: header hash. customize your own header here.

Common ldQuery Options:
Common ldquery Options:

* type: indicate the response data type. could be `text` or `json`.
* json: json object to pass. shorthand for manually setting headers and stringify object.
Expand Down Expand Up @@ -126,7 +126,7 @@ Using `xhr` is almost identical with using `fetch`:
.catch (e) -> # use e.data to get raw response from fetch
`

Yet it accepts one additional ldQuery option:
Yet it accepts one additional ldquery option:

* progress({percent, val, len}): a callback function accepting progress information as an object
- percent: 0 ~ 1, 1 = finished.
Expand All @@ -150,7 +150,7 @@ When request failed, ld$.fetch will try to parse returned data as json, and chec

## Compatibility

ldQuery uses following modern web features:
ldquery uses following modern web features:

* fetch api - not support in IE, Older Edge ( <= 13). Use polyfill to support to IE >= 11
* classList - not support well in IE. Use Polyfill to fix this.
Expand Down

0 comments on commit 9d37127

Please sign in to comment.