summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/ansi-escapes/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/ansi-escapes/index.js')
-rw-r--r--tools/eslint/node_modules/ansi-escapes/index.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/ansi-escapes/index.js b/tools/eslint/node_modules/ansi-escapes/index.js
index 6bc26c82a2..df14c890e4 100644
--- a/tools/eslint/node_modules/ansi-escapes/index.js
+++ b/tools/eslint/node_modules/ansi-escapes/index.js
@@ -76,4 +76,25 @@ x.eraseScreen = ESC + '2J';
x.scrollUp = ESC + 'S';
x.scrollDown = ESC + 'T';
+x.clearScreen = '\u001bc';
x.beep = '\u0007';
+
+x.image = function (buf, opts) {
+ opts = opts || {};
+
+ var ret = '\u001b]1337;File=inline=1';
+
+ if (opts.width) {
+ ret += ';width=' + opts.width;
+ }
+
+ if (opts.height) {
+ ret += ';height=' + opts.height;
+ }
+
+ if (opts.preserveAspectRatio === false) {
+ ret += ';preserveAspectRatio=0';
+ }
+
+ return ret + ':' + buf.toString('base64') + '\u0007';
+};