code: function(value) {
          switch (values.typeOf(value)) {
              case 'Null':
              case 'Boolean':
              case 'String':
              case 'Number':
                  return value;
  
              case 'RegExp':
                  return String(value);
  
              case 'Date':
              case 'Duration':
                  return value.valueOf();
  
              case 'Filter':
                  return value.source;
  
              case 'Array':
                  return _.map(value, this.toJSONCompatible, this);
  
              case 'Object':
                  return _.mapObject(value, this.toJSONCompatible, this);
          }
      }
docs: Returns a value that can be serialized to JSON.