node/deps/npm/node_modules/strip-ansi/index.js

7 lines
161 B
JavaScript
Raw Normal View History

2014-08-01 00:05:30 +08:00
'use strict';
2014-09-17 06:38:50 +08:00
var ansiRegex = require('ansi-regex')();
2014-08-01 00:05:30 +08:00
module.exports = function (str) {
return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
};