lib/plugin.js
function isJSON (file) {
  try {
    JSON.parse(file.contents.toString());
    return true;
  } catch (err) {
    return false;
  }
}
function isJSON (file) {
  try {
    JSON.parse(file.contents.toString());
    return true;
  } catch (err) {
    return false;
  }
}
function isJSON ( file ) { try { JSON . parse ( file . contents . toString ( ) ) ; return true ; } catch ( err ) { return false ; } }
Tests if file content is valid JSON
@param {object} Vinyl file
@returns {boolean}
@private
Tests if file content is valid JSON