bigint-crypto-utils/node_modules/table-layout/lib/ansi.js

18 lines
264 B
JavaScript
Raw Normal View History

'use strict'
const ansiEscapeSequence = /\u001b.*?m/g
/**
* @module ansi
*/
exports.remove = remove
exports.has = has
function remove (input) {
return input.replace(ansiEscapeSequence, '')
}
function has (input) {
return ansiEscapeSequence.test(input)
}