How to use the strip-ansi.default function in strip-ansi

To help you get started, we’ve selected a few strip-ansi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pgilad / leasot / tests / cli-spec.js View on Github external
cp.on('close', function (exitCode) {
        cb(exitCode, eol_1.split(strip_ansi_1["default"](chunks)));
    });
}
github pgilad / leasot / tests / cli-spec.js View on Github external
testCli(['salesforce-apex.cls'], ['--associate-parser', '.cls,defaultParser'], function (exitCode, log) {
            should.exist(exitCode);
            should.exist(log);
            exitCode.should.equal(1);
            log.should.eql([
                '',
                'tests/fixtures/salesforce-apex.cls',
                '  line 4  TODO   Add detail',
                '  line 7  FIXME  do something with the file contents',
                '',
                ' ' + strip_ansi_1["default"](logSymbols.error) + ' 2 todos/fixmes found',
                '',
            ]);
            callback();
        });
    });
github pgilad / leasot / tests / cli-spec.js View on Github external
testCli(['no-todos.js'], null, function (exitCode, log) {
            should.exist(log);
            should.exist(exitCode);
            exitCode.should.equal(0);
            log.should.eql(['', '', ' ' + strip_ansi_1["default"](logSymbols.success) + ' No todos/fixmes found', '']);
            callback();
        });
    });
github pgilad / leasot / tests / cli-spec.js View on Github external
testCli(['file.unsupported'], [], function (exitCode, log) {
            should.exist(exitCode);
            should.exist(log);
            exitCode.should.equal(1);
            log.should.eql([strip_ansi_1["default"](logSymbols.error) + ' Filetype .unsupported is unsupported.', '']);
            callback();
        });
    });
github pgilad / leasot / tests / cli-spec.js View on Github external
testCli(['*.impossible'], null, function (exitCode, log) {
            should.exist(log);
            should.exist(exitCode);
            exitCode.should.equal(1);
            log.should.eql([strip_ansi_1["default"](logSymbols.warning) + ' No files found for parsing', '']);
            callback();
        });
    });

strip-ansi

Strip ANSI escape codes from a string

MIT
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis

Popular strip-ansi functions