Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
alias: 'e'
}
}
});
const input = cli.input[0];
if (!input && process.stdin.isTTY) {
console.log('Specify something to hash');
process.exit(1);
}
if (input) {
console.log(hasha(input, cli.flags));
} else {
process.stdin.pipe(hasha.stream(cli.flags)).pipe(process.stdout);
}
const dirHash = dir => {
return streamToString(
tar.pack(dir).pipe(
hasha.stream({
algorithm: 'sha1',
}),
),
);
};