random bs

This commit is contained in:
Erik 2020-04-14 18:05:37 +03:00
parent 0e172dd73a
commit c22eea56bd

View File

@ -1,10 +1,10 @@
/* eslint-disable no-control-regex */
const { transports: { File }} = require('winston');
const debug = require('diagnostics')('winston:file');
const { MESSAGE } = require('triple-beam');
const moment = require('moment');
const chalk = require('chalk');
const regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g
const regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
class FileExtension extends File {
@ -38,7 +38,7 @@ class FileExtension extends File {
}
// Grab the raw string and append the expected EOL.
const output = `${info[MESSAGE]}${this.eol}`.replace(regex, '')
const output = `${info[MESSAGE]}${this.eol}`.replace(regex, '');
const bytes = Buffer.byteLength(output);
// After we have written to the PassThrough check to see if we need