aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js
deleted file mode 100644
index 46418780..00000000
--- a/vnfmarket/src/main/webapp/vnfmarket/node_modules/utile/lib/file.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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'));
-};