whitespace
CLI tool that trims trailing whitespace from a file and preserves the correct OS newlines.
installation
npm install whitespace -g
usage
pass a filename or glob as arguments and whitespace will remove trailing whitespace and update them in-place
whitespace file.js
# or
whitespace *.js