3 var fs = require('fs');
4 var stdin = require('get-stdin');
5 var pkg = require('./package.json');
6 var stripIndent = require('./');
7 var argv = process.argv.slice(2);
13 ' ' + pkg.description,
16 ' strip-indent <file>',
17 ' echo <string> | strip-indent',
20 ' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent',
27 console.log(stripIndent(data));
30 if (argv.indexOf('--help') !== -1) {
35 if (argv.indexOf('--version') !== -1) {
36 console.log(pkg.version);
40 if (process.stdin.isTTY) {
46 init(fs.readFileSync(input, 'utf8'));