UNPKG
choo-shortcache
Version:
latest (0.0.0)
0.0.0
choo nanocomponent cache shortcut
choo-shortcache
/
example
/
node_modules
/
browserify
/
test
/
async
/
src.js
9 lines
(6 loc)
•
201 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
function
f
(
x
) {
return
new
Promise
(
resolve
=>
{ process.
nextTick
(
() =>
{
resolve
(x) }) }) }
async
function
add
(
x
) {
return
x +
await
f
(
20
) +
await
f
(
30
) }
add
(
10
).
then
(
v
=>
{
console
.
log
(v) })