File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
# event-queue
2
2
3
- Used to control events(async or sync) list
3
+ events(async or sync) list management
4
4
5
5
## Use
6
6
7
- - maxEventNumber:{number} can run max event,default 5
8
- - async:{boolean} event list run with async or sync,default false, it means sync
9
- - breakRun:{function} break the add event to event list,while false(default return false),can continue to add
7
+ - maxEventNumber:{number} can run max event,default ` 5 `
8
+ - async:{boolean} event list run with async or sync,default ` false ` , it means sync
9
+ - breakRun:{function} break the add event to event list,while ` false ` (default return ` false ` ),can continue to add
10
10
11
11
``` bash
12
- npm install -S event-queue.js
12
+ npm install -S event-queuejs
13
13
// or
14
- yarn add event-queue.js
14
+ yarn add event-queuejs
15
15
```
16
16
17
17
``` javascript
18
- import EventQueue from ' event-queue.js ' ;
18
+ import EventQueue from ' event-queuejs ' ;
19
19
const eventQueue = new EventQueue ();
20
20
const eventList = [];
21
21
const eventArr = new Array (46 ).join (' ,' ).split (' ,' );
@@ -32,5 +32,5 @@ eventArr.map(() => {
32
32
});
33
33
});
34
34
// add event list to instance and run it!
35
- eventQueue .add (taskList ).run ();
35
+ eventQueue .add (eventList ).run ();
36
36
```
You can’t perform that action at this time.
0 commit comments