-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.js
More file actions
executable file
·37 lines (29 loc) · 832 Bytes
/
util.js
File metadata and controls
executable file
·37 lines (29 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var fileSystem = require("fs");
exports.isEmpty = function (obj) {
for ( var prop in obj) {
if (obj.hasOwnProperty(prop))
return false;
}
return true;
};
exports.printPropertiesOfObj = function (obj) {
for (var p in obj) {
console.log(p + "=" + obj[p]);
}
};
function printPropertiesOfObj (obj) {
for (var p in obj) {
console.log(p + "=" + obj[p]);
}
};
exports.aaa = printPropertiesOfObj;
function returnStaticHTMLPage(path) {
var data = fileSystem.readFileSync(__dirname + "/client/" + path + ".html", "utf8");
return data;
}
exports.returnStaticHTMLPage = returnStaticHTMLPage;
function returnResource(path) {
var data = fileSystem.readFileSync(__dirname + "/client/" + path, "utf8");
return data;
}
exports.returnResource = returnResource;