index.js
function valueStrim(value, cutoff) {
        var strimLimit = typeof cutoff === 'undefined' ? 60 : cutoff;

        var t = typeof value;
        if (t === 'function') {
          return '[function]';
        }
        if (t === 'object') {
          value = JSON.stringify(value);
          if (value.length > strimLimit) {
            value = value.substr(0, strimLimit) + '...';
          }
          return value;
        }
        if (t === 'string') {
          if (value.length > strimLimit) {
            return JSON.stringify(value.substr(0, strimLimit)) + '...';
          }
          return JSON.stringify(value);
        }
        return '' + value;
      }
function valueStrim(value, cutoff) {
        var strimLimit = typeof cutoff === 'undefined' ? 60 : cutoff;

        var t = typeof value;
        if (t === 'function') {
          return '[function]';
        }
        if (t === 'object') {
          value = JSON.stringify(value);
          if (value.length > strimLimit) {
            value = value.substr(0, strimLimit) + '...';
          }
          return value;
        }
        if (t === 'string') {
          if (value.length > strimLimit) {
            return JSON.stringify(value.substr(0, strimLimit)) + '...';
          }
          return JSON.stringify(value);
        }
        return '' + value;
      }
function valueStrim ( value , cutoff ) { var strimLimit = typeof cutoff === 'undefined' ? 60 : cutoff ; var t = typeof value ; if ( t === 'function' ) { return '[function]' ; } if ( t === 'object' ) { value = JSON . stringify ( value ) ; if ( value . length > strimLimit ) { value = value . substr ( 0 , strimLimit ) + '...' ; } return value ; } if ( t === 'string' ) { if ( value . length > strimLimit ) { return JSON . stringify ( value . substr ( 0 , strimLimit ) ) + '...' ; } return JSON . stringify ( value ) ; } return '' + value ; }
make a compact debug string from any object
make a compact debug string from any object