File: strip.js

package info (click to toggle)
node-tad 3.1.1%2B~cs11.22.49-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,400 kB
  • sloc: javascript: 25,549; makefile: 6
file content (8 lines) | stat: -rw-r--r-- 249 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
// Strip ANSI formatting from string

"use strict";

var stringifiable = require("es5-ext/object/validate-stringifiable")
  , r             = require("./regex-ansi")();

module.exports = function (str) { return stringifiable(str).replace(r, ""); };