repositories
/
benchmarks-js.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[benchmarks-js.git]
/
promise-handling.mjs
diff --git
a/promise-handling.mjs
b/promise-handling.mjs
index b3b02107c9cfc793a7c3149db013236df206b8bb..ffb42ff96861de27332160a9748cbecf1e8755da 100644
(file)
--- a/
promise-handling.mjs
+++ b/
promise-handling.mjs
@@
-4,7
+4,7
@@
import Benchmark from 'benny'
*
*/
function promise () {
*
*/
function promise () {
- return new Promise(
resolve
=> {
+ return new Promise(
(resolve)
=> {
resolve()
})
}
resolve()
})
}
@@
-27,10
+27,10
@@
Benchmark.suite(
}),
Benchmark.add('promise with then().catch()', () => {
asyncFunction()
}),
Benchmark.add('promise with then().catch()', () => {
asyncFunction()
- .then(
r
=> {
+ .then(
(r)
=> {
return r
})
return r
})
- .catch(
e
=> {
+ .catch(
(e)
=> {
console.error(e)
})
}),
console.error(e)
})
}),
@@
-58,6
+58,6
@@
Benchmark.suite(
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
-).catch(
err
=> {
+).catch(
(err)
=> {
console.error(err)
})
console.error(err)
})