| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent de3a1c3 commit 4cd4e7c
26 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,16 +13,19 @@ function main({ n }) { | |||
| 13 | 13 | if (j === n) | |
| 14 | 14 | bench.end(n); | |
| 15 | 15 | } | |
| 16 | + | ||
| 16 | 17 | function cb2(arg1, arg2) { | |
| 17 | 18 | j++; | |
| 18 | 19 | if (j === n) | |
| 19 | 20 | bench.end(n); | |
| 20 | 21 | } | |
| 22 | + | ||
| 21 | 23 | function cb3(arg1, arg2, arg3) { | |
| 22 | 24 | j++; | |
| 23 | 25 | if (j === n) | |
| 24 | 26 | bench.end(n); | |
| 25 | 27 | } | |
| 28 | + | ||
| 26 | 29 | function cb4(arg1, arg2, arg3, arg4) { | |
| 27 | 30 | j++; | |
| 28 | 31 | if (j === n) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ function main({ n }) { | |||
| 20 | 20 | } else | |
| 21 | 21 | bench.end(n); | |
| 22 | 22 | } | |
| 23 | + | ||
| 23 | 24 | function cb3(arg1, arg2, arg3) { | |
| 24 | 25 | if (--counter) { | |
| 25 | 26 | if (counter % 4 === 0) | |
@@ -33,6 +34,7 @@ function main({ n }) { | |||
| 33 | 34 | } else | |
| 34 | 35 | bench.end(n); | |
| 35 | 36 | } | |
| 37 | + | ||
| 36 | 38 | function cb2(arg1, arg2) { | |
| 37 | 39 | if (--counter) { | |
| 38 | 40 | if (counter % 4 === 0) | |
@@ -46,6 +48,7 @@ function main({ n }) { | |||
| 46 | 48 | } else | |
| 47 | 49 | bench.end(n); | |
| 48 | 50 | } | |
| 51 | + | ||
| 49 | 52 | function cb1(arg1) { | |
| 50 | 53 | if (--counter) { | |
| 51 | 54 | if (counter % 4 === 0) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,9 @@ function main({ n }) { | |||
| 12 | 12 | }); | |
| 13 | 13 | ||
| 14 | 14 | function cb1(arg1) {} | |
| 15 | + | ||
| 15 | 16 | function cb2(arg1, arg2) {} | |
| 17 | + | ||
| 16 | 18 | function cb3(arg1, arg2, arg3) {} | |
| 17 | 19 | ||
| 18 | 20 | bench.start(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,7 @@ function main({ n }) { | |||
| 21 | 21 | setImmediate(cb1, n); | |
| 22 | 22 | } | |
| 23 | 23 | } | |
| 24 | + | ||
| 24 | 25 | function cb2(n, arg2) { | |
| 25 | 26 | if (--n) { | |
| 26 | 27 | if (n % 3 === 0) | |
@@ -31,6 +32,7 @@ function main({ n }) { | |||
| 31 | 32 | setImmediate(cb1, n); | |
| 32 | 33 | } | |
| 33 | 34 | } | |
| 35 | + | ||
| 34 | 36 | function cb1(n) { | |
| 35 | 37 | if (--n) { | |
| 36 | 38 | if (n % 3 === 0) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,16 +12,19 @@ function main({ n }) { | |||
| 12 | 12 | if (j === n) | |
| 13 | 13 | bench.end(n); | |
| 14 | 14 | } | |
| 15 | + | ||
| 15 | 16 | function cb2(arg1, arg2) { | |
| 16 | 17 | j++; | |
| 17 | 18 | if (j === n) | |
| 18 | 19 | bench.end(n); | |
| 19 | 20 | } | |
| 21 | + | ||
| 20 | 22 | function cb3(arg1, arg2, arg3) { | |
| 21 | 23 | j++; | |
| 22 | 24 | if (j === n) | |
| 23 | 25 | bench.end(n); | |
| 24 | 26 | } | |
| 27 | + | ||
| 25 | 28 | function cb4(arg1, arg2, arg3, arg4) { | |
| 26 | 29 | j++; | |
| 27 | 30 | if (j === n) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,9 +19,11 @@ function main({ n }) { | |||
| 19 | 19 | function cb() { | |
| 20 | 20 | process.nextTick(counter); | |
| 21 | 21 | } | |
| 22 | + | ||
| 22 | 23 | function cb2() { | |
| 23 | 24 | process.nextTick(counter); | |
| 24 | 25 | } | |
| 26 | + | ||
| 25 | 27 | function counter() { | |
| 26 | 28 | count++; | |
| 27 | 29 | if (count === n) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ function main({ n }) { | |||
| 20 | 20 | if (count === n) | |
| 21 | 21 | bench.end(n); | |
| 22 | 22 | } | |
| 23 | + | ||
| 23 | 24 | function cb2() { | |
| 24 | 25 | count++; | |
| 25 | 26 | if (count === n) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ function main({ n }) { | |||
| 20 | 20 | if (count === n) | |
| 21 | 21 | bench.end(n); | |
| 22 | 22 | } | |
| 23 | + | ||
| 23 | 24 | function cb2() { | |
| 24 | 25 | count++; | |
| 25 | 26 | if (count === n) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1266,9 +1266,11 @@ a string as the second argument gets considered: | |||
| 1266 | 1266 | function throwingFirst() { | |
| 1267 | 1267 | throw new Error('First'); | |
| 1268 | 1268 | } | |
| 1269 | + | ||
| 1269 | 1270 | function throwingSecond() { | |
| 1270 | 1271 | throw new Error('Second'); | |
| 1271 | 1272 | } | |
| 1273 | + | ||
| 1272 | 1274 | function notThrowing() {} | |
| 1273 | 1275 | ||
| 1274 | 1276 | // The second argument is a string and the input function threw an Error. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -646,6 +646,7 @@ function needFinish(state) { | |||
| 646 | 646 | !state.finished && | |
| 647 | 647 | !state.writing); | |
| 648 | 648 | } | |
| 649 | + | ||
| 649 | 650 | function callFinal(stream, state) { | |
| 650 | 651 | stream._final((err) => { | |
| 651 | 652 | state.pendingcb--; | |
@@ -658,6 +659,7 @@ function callFinal(stream, state) { | |||
| 658 | 659 | } | |
| 659 | 660 | }); | |
| 660 | 661 | } | |
| 662 | + | ||
| 661 | 663 | function prefinish(stream, state) { | |
| 662 | 664 | if (!state.prefinished && !state.finalCalled) { | |
| 663 | 665 | if (typeof stream._final === 'function' && !state.destroyed) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments