lib/store.js
function convertValue(value, cast) {
  var val;
  if (value === null || value === undefined) {
    return value;
  }
  val = Buffer.isBuffer(value) ? value.toString('utf8') : value;
  if (cast !== false && typeof val === 'string') {
    try {
      return JSON.parse(val);
    } catch (e) {}
  }
  return val;
}
function convertValue(value, cast) {
  var val;
  if (value === null || value === undefined) {
    return value;
  }
  val = Buffer.isBuffer(value) ? value.toString('utf8') : value;
  if (cast !== false && typeof val === 'string') {
    try {
      return JSON.parse(val);
    } catch (e) {}
  }
  return val;
}
function convertValue ( value , cast ) { var val ; if ( value === null || value === undefined ) { return value ; } val = Buffer . isBuffer ( value ) ? value . toString ( 'utf8' ) : value ; if ( cast !== false && typeof val === 'string' ) { try { return JSON . parse ( val ) ; } catch ( e ) { } } return val ; }
Convert a value

@param   {*}         value       Value to convert
@param   {Boolean}   rawBuffer   true to return a raw buffer
@param   {Boolean}   cast        true to cast the value
@returns {*}         converted value
Convert a value