Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yoriiis committed Aug 31, 2021
1 parent 2c5df57 commit c9bc3d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
@@ -1,8 +1,8 @@
# asyncCallReducer
# AsyncCallReducer

![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/yoriiis/async-call-reducer/Build/main?style=for-the-badge) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/async-call-reducer?style=for-the-badge)](https://coveralls.io/github/yoriiis/async-call-reducer?branch=main)

The `asyncCallReducer` is a function to reduce calls using browser storage. A Promise can be encapsulated, a single HTTP request will be triggered regardless of the number of calls. Concurrent calls are added on a queue and return's data are stored in the browser.
The `AsyncCallReducer` is a function to reduce calls using browser storage. A Promise can be encapsulated, a single HTTP request will be triggered regardless of the number of calls. Concurrent calls are added on a queue and return's data are stored in the browser.

Rules:

Expand All @@ -24,11 +24,11 @@ yarn add --dev async-call-reducer

## Environment

`asyncCallReducer` was built for Node.js `>=12`.
`AsyncCallReducer` was built for Node.js `>=12`.

## Demo

The project includes an example of an implementation of `asyncCallReducer` in the directory `./demo/`.
The project includes an example of an implementation of `AsyncCallReducer` in the directory `./demo/`.

## Usage

Expand All @@ -41,7 +41,7 @@ async function getData() {
}
```

By wrapping the function with the `asyncCallReducer`, a single HTTP request will be triggered. Other calls will return exactly the same value, either from the storage or from the queue if the calls was concurrent.
By wrapping the function with the `AsyncCallReducer`, a single HTTP request will be triggered. Other calls will return exactly the same value, either from the storage or from the queue if the calls was concurrent.

```diff
async function getData() {
Expand Down Expand Up @@ -102,6 +102,6 @@ asyncCallReducer({

## Licence

`asyncCallReducer` is licensed under the [MIT License](http://opensource.org/licenses/MIT).
`AsyncCallReducer` is licensed under the [MIT License](http://opensource.org/licenses/MIT).

Created with ♥ by [@yoriiis](http://github.com/yoriiis).
2 changes: 1 addition & 1 deletion demo/index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<title>AsyncCallReducer</title>
<meta charset="UTF-8" />
<script type="module" defer src="./demo.js"></script>
</head>
Expand Down

0 comments on commit c9bc3d2

Please sign in to comment.