UNPKG
huxley
Version:
latest (0.8.3)
0.8.3
0.8.2
0.8.1
0.8.0
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.0
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.3
0.1.2
New wave front-end testing.
github.com/chenglou/node-huxley
chenglou/node-huxley
huxley
/
source
/
fileOps
/
utils
/
loadJSON.js
11 lines
(8 loc)
•
211 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
Promise
=
require
(
'bluebird'
);
var
fsP =
require
(
'../../promisified/fsP'
);
function
loadJSON
(
p
) {
return
fsP .
readFileAsync
(p, {
encoding
:
'utf8'
}) .
then
(
JSON
.
parse
); }
module
.
exports
= loadJSON;