Logging Update
- Changed to uniform logging with the 'debug' module - Updated all apps
This commit is contained in:
9
Server/utilities/utils.js
Normal file
9
Server/utilities/utils.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// Convert a JSON object to a buffer for the DB
|
||||
exports.JsonToBuffer = (jsonObject) => {
|
||||
return Buffer.from(JSON.stringify(jsonObject))
|
||||
}
|
||||
|
||||
// Convert a buffer from the DB to JSON object
|
||||
exports.BufferToJson = (buffer) => {
|
||||
return JSON.parse(buffer.toString());
|
||||
}
|
||||
Reference in New Issue
Block a user