lib/plugin.js
function isBinary (file) {
  return new Promise((resolve, reject) => {
    isTextOrBinary.isText(Path.basename(file.path), file.contents, (err, isText) => {
      if (err) return reject(err);
      if (isText) file.isText = true;
      resolve(file);
    });
  });
}
function isBinary (file) {
  return new Promise((resolve, reject) => {
    isTextOrBinary.isText(Path.basename(file.path), file.contents, (err, isText) => {
      if (err) return reject(err);
      if (isText) file.isText = true;
      resolve(file);
    });
  });
}
function isBinary ( file ) { return new Promise ( ( resolve , reject ) => { isTextOrBinary . isText ( Path . basename ( file . path ) , file . contents , ( err , isText ) => { if ( err ) return reject ( err ) ; if ( isText ) file . isText = true ; resolve ( file ) ; } ) ; } ) ; }
Tests if file content is ASCII
@param {Vinyl} file - Vinyl file object
@returns {Promise.<boolean>}
@private
Tests if file content is ASCII