UNPKG
co-wait
Version:
latest (0.0.0)
0.0.0
setTimeout generator style
github.com/juliangruber/co-wait
juliangruber/co-wait
co-wait
/
example.js
10 lines
(7 loc)
•
147 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
var
wait =
require
(
'./'
);
var
co =
require
(
'co'
);
co
(
function
* (){
console
.
log
(
Date
.
now
());
yield
wait
(
1000
);
console
.
log
(
Date
.
now
()); });