UNPKG
q
Version:
future (2.0.3)
latest (1.5.1)
2.0.3
2.0.2
2.0.1
2.0.0
1.5.1
1.5.0
1.4.1
1.4.0
1.3.0
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.12
0.8.11
0.8.10
0.8.9
0.8.8
0.8.7
0.8.6
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.2
0.7.1
0.7.0
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.4
0.4.2
0.4.1
0.4.0
0.3.0
0.2.10
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.2.0-rc1
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.3
0.0.2
0.0.1
0.0.0
A library for promises (CommonJS/Promises/A,B,D)
github.com/kriskowal/q/
kriskowal/q
q
/
examples
/
then2.js
13 lines
(9 loc)
•
284 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
var Q =
require
(
"q/util"
); var FS =
require
(
"q-fs"
); Q.when(Q.deep({
"self"
: FS.
read
(__filename),
"passwd"
: FS.
read
(
"/etc/passwd"
) })).
then
(
function
(texts)
{ console.
log
(__filename +
":"
+ texts.
self
.length); console.
log
(
"/ext/passwd:"
+ texts.passwd.length); });