index.js
function createNewFileByContents(file, newContents) {

  var newFile = file.clone()

  newFile.contents = newContents

  return newFile
}
function createNewFileByContents(file, newContents) {

  var newFile = file.clone()

  newFile.contents = newContents

  return newFile
}
function createNewFileByContents ( file , newContents ) { var newFile = file . clone ( ) newFile . contents = newContents return newFile }
Returns a new file from the given file and contents.
@param {Vinyl} file The input file
@param {Buffer|Stream} newContents The new contents for the file
Returns a new file from the given file and contents .