Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit651fba9

Browse files
authored
Merge pull request#12 from TNT-03/1.0.0-beta
feat: Compatible with previous versions
2 parentsb3bacc5 +4f2c76e commit651fba9

File tree

12 files changed

+55
-30
lines changed

12 files changed

+55
-30
lines changed

‎README-zh_CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm i async-task-mapping --save
1818

1919
###使用 createTaskList
2020

21-
版本 1.0.0-beta
21+
版本
2222

2323
```javascript
2424
import {createTaskList }from"async-task-mapping";

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm i async-task-mapping --save
1818

1919
###use createTaskList
2020

21-
version 1.0.0-beta
21+
version
2222

2323
```javascript
2424
import {createTaskList }from"async-task-mapping";

‎container/constant.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
exportconstDEFAULT_COBBLESTONE=1
2-
exportconstBROOK=1<<1
3-
exportconstRIVERS=1
4-
exportconstFLOOD=0
5-
exportconstRIVER_NETWORK=FLOOD|RIVERS
6-
exportconstNOISE=['constructor','Symbol(Symbol.toStringTag)']
1+
exportconstDEFAULT_COBBLESTONE=1;
2+
exportconstBROOK=1<<1;
3+
exportconstRIVERS=1;
4+
exportconstFLOOD=0;
5+
exportconstRIVER_NETWORK=FLOOD|RIVERS;
6+
exportconstNOISE=["constructor","Symbol(Symbol.toStringTag)"];
7+
exportconstMOTHODS=[{name:"pushResolve",oldName:"pushResponse"}];

‎container/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export*from'./constant'
2-
export*from'./explain'
1+
export*from"./constant";
2+
export*from"./explain";

‎index.js‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
importUnorderedListfrom"./task/unorderedList"
2-
importOrderedListfrom"./task/orderedList"
3-
importTaskOrderfrom"./task/taskOrder"
4-
1+
importUnorderedListfrom"./task/unorderedList";
2+
importOrderedListfrom"./task/orderedList";
3+
importTaskOrderfrom"./task/taskOrder";
54

65
constcreateTaskOrder=()=>{
7-
returnnewTaskOrder()
8-
}
6+
returnnewTaskOrder();
7+
};
98

109
constcreateTaskList=({
1110
requestCount,
1211
taskCount,
1312
responseCount,
1413
resolveCount,
15-
ordered=true
16-
}={})=>
17-
new(ordered ?OrderedList :UnorderedList)([
14+
ordered=true,
15+
}={})=>{
16+
if(requestCount||responseCount){
17+
console.warn(
18+
"Please use an API after v1.0.0. The current API is already in an unsafe state."
19+
);
20+
}
21+
returnnew(ordered ?OrderedList :UnorderedList)([
1822
taskCount||requestCount||1,
19-
resolveCount||responseCount||1
20-
])
23+
resolveCount||responseCount||1,
24+
]);
25+
};
2126

22-
export{createTaskList,createTaskOrder}
27+
export{createTaskList,createTaskOrder};

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"async-task-mapping",
3-
"version":"1.0.0-beta",
3+
"version":"1.0.0",
44
"main":"dist/index.js",
55
"module":"dist/index.js",
66
"author":"Jiegang Liang (t.n.t)",
@@ -36,7 +36,7 @@
3636
"license":"MIT",
3737
"description":"Asynchronous Task Manager.",
3838
"npmName":"async-task-mapping",
39-
"keywords": ["async","task","mapping","list","await","promise"],
39+
"keywords": ["async","task","mapping","list","await","promise","manage"],
4040
"npmFileMap": [
4141
{
4242
"basePath":"/dist/",

‎task/orderedList.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importSeaAnemonesfrom"./seaAnemones";
2-
import{checkCallback}from"./../utils/index";
2+
import{checkCallback,addOldMotheds}from"./../utils/index";
3+
34
classOrderedListextendsSeaAnemones{
45
constructor(taskCount){
56
conststore={
@@ -13,6 +14,7 @@ class OrderedList extends SeaAnemones {
1314
};
1415
super(store);
1516
this.#store=store;
17+
addOldMotheds(this);
1618
}
1719
#store=null;
1820
request(cb){

‎task/taskOrder.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import{getTracks}from"../utils/index";
22
importCellfrom"./cell";
3+
import{addOldMotheds}from"./../utils/index";
34

45
classTaskOrderextendsCell{
56
// 链带
@@ -12,6 +13,7 @@ class TaskOrder extends Cell {
1213
constructor(){
1314
super();
1415
this.clear();
16+
addOldMotheds(this);
1517
}
1618
clear(){
1719
this.#slider={};

‎task/unorderedList.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
importSeaAnemonesfrom"./seaAnemones";
2-
import{checkCallback}from"./../utils/index";
2+
import{checkCallback,addOldMotheds}from"./../utils/index";
33

44
classUnorderedListextendsSeaAnemones{
55
constructor(taskCount){
@@ -12,6 +12,7 @@ class UnorderedList extends SeaAnemones {
1212
};
1313
super(store);
1414
this.#store=store;
15+
addOldMotheds(this);
1516
}
1617
#store=null;
1718
request(cb){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp