index.js
function tryParse (val) {
  var res = null
  try {
    res = JSON.parse(val.toString())
  } catch (err) {
    res = err
  }
  return res
}
function tryParse (val) {
  var res = null
  try {
    res = JSON.parse(val.toString())
  } catch (err) {
    res = err
  }
  return res
}
function tryParse ( val ) { var res = null try { res = JSON . parse ( val . toString ( ) ) } catch ( err ) { res = err } return res }
> Catch JSON parse errors

@param  {Buffer} `val`
@return {String|Array|Error}
> Catch JSON parse errors