function isVinyl(file) {
  return (
    Vinyl.isVinyl(file) ||
    file instanceof Vinyl ||
    (file && /function File\(/.test(file.constructor.toString()) && file.contents && file.path)
  );
}
Wrapper for File.isVinyl to detect vinyl objects generated by gulp (vinyl < v0.5.6)
@param {*} file Object to check
@returns {boolean} True if it's a valid vinyl object