index.js 161 B

1234567
  1. 'use strict';
  2. var ansiRegex = require('ansi-regex')();
  3. module.exports = function (str) {
  4. return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
  5. };