$ npm install detect-indent-cliDetect the indentation of code
npm install --global detect-indent-cli
$ detect-indent --help
Usage
$ detect-indent <file>
echo <string> | detect-indent
Options
--verbose Show indent type and amount
Example
$ echo ' foo\n bar' | detect-indent | wc --chars
2
$ echo ' foo\n bar' | detect-indent --verbose
Type: space
Amount: 2