File: index.js

package info (click to toggle)
node-strip-ansi 5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128 kB
  • sloc: makefile: 2
file content (7 lines) | stat: -rw-r--r-- 220 bytes parent folder | download
1
2
3
4
5
6
7
'use strict';
const ansiRegex = require('ansi-regex');

const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;

module.exports = stripAnsi;
module.exports.default = stripAnsi;