34 lines
713 B
JavaScript
34 lines
713 B
JavaScript
var os = require("os");
|
|
|
|
module.exports = {
|
|
getHostname: function () {
|
|
return os.hostname()
|
|
},
|
|
testing: function () {
|
|
return (process.env.TESTING_ON === '1')
|
|
},
|
|
|
|
mylog: function (...args) {
|
|
if (!this.testing())
|
|
console.log(args)
|
|
},
|
|
|
|
mylogoff: function (...args) {
|
|
// doing nothing
|
|
},
|
|
|
|
mylogshow: function (...args) {
|
|
console.log(args)
|
|
},
|
|
|
|
allfieldTodo: function () {
|
|
return ['userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
|
|
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'id_next', 'progress', 'modified']
|
|
},
|
|
|
|
allfieldTodoWithId: function () {
|
|
return ['_id', ...this.allfieldTodo()]
|
|
}
|
|
|
|
};
|