Files
DRB-CnC/Server/utilities/utils.js
Logan Cusano e5d885cc3e Logging Update
- Changed to uniform logging with the 'debug' module
- Updated all apps
2022-12-11 21:11:29 -05:00

9 lines
270 B
JavaScript

// 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());
}