serverpreconfigured 2.2.7 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/logs/logs.js CHANGED
@@ -28,8 +28,12 @@ function stringfyError(err) {
28
28
  if (type !== 'object')
29
29
  return err.toString();
30
30
  let ret = stringfyObject(err, 0);
31
- return ret;
31
+ return ret || "";
32
32
  function stringfyObject(obj, level = 0) {
33
+ if (!obj)
34
+ return null;
35
+ if (typeof (obj) !== 'object')
36
+ return obj.toString();
33
37
  if (level == 8)
34
38
  return "Is Object level max 8";
35
39
  let ret = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverpreconfigured",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "\"Pre-configured server with authentication system and database integration\"",
5
5
  "main": "dist/server.js",
6
6
  "keywords": [
package/src/logs/logs.ts CHANGED
@@ -26,8 +26,12 @@ export function stringfyError(err:any):string{
26
26
  if(type!=='object')
27
27
  return err.toString();
28
28
  let ret=stringfyObject(err,0);
29
- return ret;
29
+ return ret||"";
30
30
  function stringfyObject(obj:any,level:number=0){
31
+ if(!obj)
32
+ return null;
33
+ if(typeof(obj)!=='object')
34
+ return obj.toString();
31
35
  if(level==8)
32
36
  return "Is Object level max 8";
33
37
  let ret:any={};