src/helpers.js
function filterHashes( hashes )
{
  const validHashes = crypto.getHashes();

  return hashes.filter( hash => {
    if ( validHashes.includes(hash) ) {
      return true;
    }

    warn(chalk`{blueBright ${hash}} is not a supported hash algorithm`);

    return false;
  });
}
function filterHashes( hashes )
{
  const validHashes = crypto.getHashes();

  return hashes.filter( hash => {
    if ( validHashes.includes(hash) ) {
      return true;
    }

    warn(chalk`{blueBright ${hash}} is not a supported hash algorithm`);

    return false;
  });
}
function filterHashes ( hashes ) { const validHashes = crypto . getHashes ( ) ; return hashes . filter ( hash => { if ( validHashes . includes ( hash ) ) { return true ; } warn ( chalk ` ${ hash } ` ) ; return false ; } ) ; }
Filter out invalid hash algorithms.

@param  {array} hashes
@return {array} Valid hash algorithms
Filter out invalid hash algorithms .