index.js
function joinMsgArgs(msgArgs) {
         if (!msgArgs) {
             return '';
         }
         return msgArgs.map((arg) => {
            if (arg === null) {
                return 'null';
            } else if (typeof arg === 'undefined') {
                return 'undefined';
            } else if (typeof arg === 'string') {
                 return arg;
             } else if (typeof arg === 'object') {
                 try {
                     return JSON.stringify(arg);
                 } catch (ex) {
                     return arg.toString();
                 }
             } else { // boolean, symbol, number, function
                 return arg.toString();
             }
         }).join(' ');
     }
function joinMsgArgs(msgArgs) {
         if (!msgArgs) {
             return '';
         }
         return msgArgs.map((arg) => {
            if (arg === null) {
                return 'null';
            } else if (typeof arg === 'undefined') {
                return 'undefined';
            } else if (typeof arg === 'string') {
                 return arg;
             } else if (typeof arg === 'object') {
                 try {
                     return JSON.stringify(arg);
                 } catch (ex) {
                     return arg.toString();
                 }
             } else { // boolean, symbol, number, function
                 return arg.toString();
             }
         }).join(' ');
     }
function joinMsgArgs ( msgArgs ) { if ( ! msgArgs ) { return '' ; } return msgArgs . map ( ( arg ) => { if ( arg === null ) { return 'null' ; } else if ( typeof arg === 'undefined' ) { return 'undefined' ; } else if ( typeof arg === 'string' ) { return arg ; } else if ( typeof arg === 'object' ) { try { return JSON . stringify ( arg ) ; } catch ( ex ) { return arg . toString ( ) ; } } else { // boolean, symbol, number, function return arg . toString ( ) ; } } ) . join ( ' ' ) ; }
Create the logging functions
Create the logging functions