1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-13 03:02:49 +00:00

updated package.json

This commit is contained in:
2016-01-04 12:25:28 -05:00
parent 4f1900baa0
commit cf95136db0
1168 changed files with 73752 additions and 26424 deletions

33
node_modules/utile/lib/file.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
/*
* file.js: Simple utilities for working with the file system.
*
* (C) 2011, Nodejitsu Inc.
* MIT LICENSE
*
*/
var fs = require('fs');
exports.readJson = exports.readJSON = function (file, callback) {
if (typeof callback !== 'function') {
throw new Error('utile.file.readJson needs a callback');
}
fs.readFile(file, 'utf-8', function (err, data) {
if (err) {
return callback(err);
}
try {
var json = JSON.parse(data);
callback(null, json);
}
catch (err) {
return callback(err);
}
});
};
exports.readJsonSync = exports.readJSONSync = function (file) {
return JSON.parse(fs.readFileSync(file, 'utf-8'));
};