lib/error.js
function format(arg) {
    if (typeof arg === 'number') {
        return '0x' + arg.toString(16).toUpperCase();
    }

    if (typeof arg === 'string') {
        return '"' + arg + '"';
    }

    return arg.toString();
}
function format(arg) {
    if (typeof arg === 'number') {
        return '0x' + arg.toString(16).toUpperCase();
    }

    if (typeof arg === 'string') {
        return '"' + arg + '"';
    }

    return arg.toString();
}
function format ( arg ) { if ( typeof arg === 'number' ) { return '0x' + arg . toString ( 16 ) . toUpperCase ( ) ; } if ( typeof arg === 'string' ) { return '"' + arg + '"' ; } return arg . toString ( ) ; }
Format an argument to be displayed in the error message

@private
@param {*} arg Argument to format
@return {string} Formatted argument
Format an argument to be displayed in the error message