UNPKG
whistle.vase
Version:
latest (2.2.3)
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.4.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0
0.1.0
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.1-beta.1
0.0.1-beta
0.0.0
用于mock数据的whistle插件
github.com/whistle-plugins/whistle.vase
whistle-plugins/whistle.vase
whistle.vase
/
app
/
cgi-bin
/
export.js
9 lines
(7 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
module
.
exports
=
function
(
req, res
) { res.
writeHead
(
200
, {
'content-disposition'
:
'attachment; filename="vase-'
+
Date
.
now
() +
'.json"'
,
'content-type'
:
'application/octet-stream'
}); res.
end
(
JSON
.
stringify
(
this
.
dataMgr
.
getList
(),
null
,
'\t'
)); };