diff options
Diffstat (limited to 'node_modules/ansi-escapes')
-rw-r--r-- | node_modules/ansi-escapes/index.js | 12 | ||||
-rw-r--r-- | node_modules/ansi-escapes/license | 20 | ||||
-rw-r--r-- | node_modules/ansi-escapes/package.json | 96 | ||||
-rw-r--r-- | node_modules/ansi-escapes/readme.md | 10 |
4 files changed, 64 insertions, 74 deletions
diff --git a/node_modules/ansi-escapes/index.js b/node_modules/ansi-escapes/index.js index ebd413b01..4d47b1098 100644 --- a/node_modules/ansi-escapes/index.js +++ b/node_modules/ansi-escapes/index.js @@ -3,12 +3,12 @@ const x = module.exports; const ESC = '\u001B['; const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; -x.cursorTo = function (x, y) { - if (arguments.length === 0) { - return ESC + 'H'; +x.cursorTo = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); } - if (arguments.length === 1) { + if (typeof y !== 'number') { return ESC + (x + 1) + 'G'; } @@ -16,6 +16,10 @@ x.cursorTo = function (x, y) { }; x.cursorMove = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } + let ret = ''; if (x < 0) { diff --git a/node_modules/ansi-escapes/license b/node_modules/ansi-escapes/license index 654d0bfe9..e7af2f771 100644 --- a/node_modules/ansi-escapes/license +++ b/node_modules/ansi-escapes/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-escapes/package.json b/node_modules/ansi-escapes/package.json index fa9df558e..24cb2f213 100644 --- a/node_modules/ansi-escapes/package.json +++ b/node_modules/ansi-escapes/package.json @@ -1,50 +1,50 @@ { - "name": "ansi-escapes", - "version": "2.0.0", - "description": "ANSI escape codes for manipulating the terminal", - "license": "MIT", - "repository": "sindresorhus/ansi-escapes", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "escapes", - "formatting", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text", - "vt100", - "sequence", - "control", - "code", - "codes", - "cursor", - "iterm", - "iterm2" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } + "name": "ansi-escapes", + "version": "3.0.0", + "description": "ANSI escape codes for manipulating the terminal", + "license": "MIT", + "repository": "sindresorhus/ansi-escapes", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "escapes", + "formatting", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text", + "vt100", + "sequence", + "control", + "code", + "codes", + "cursor", + "iterm", + "iterm2" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/node_modules/ansi-escapes/readme.md b/node_modules/ansi-escapes/readme.md index 21188c9ec..45490e9ec 100644 --- a/node_modules/ansi-escapes/readme.md +++ b/node_modules/ansi-escapes/readme.md @@ -6,7 +6,7 @@ ## Install ``` -$ npm install --save ansi-escapes +$ npm install ansi-escapes ``` @@ -23,12 +23,10 @@ process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft); ## API -### cursorTo([x, [y]]) +### cursorTo(x, [y]) Set the absolute position of the cursor. `x0` `y0` is the top left of the screen. -Specify either both `x` & `y`, only `x`, or nothing. - ### cursorMove(x, [y]) Set the position of the cursor relative to its current position. @@ -129,7 +127,7 @@ Output a beeping sound. Display an image. -*Currently only supported on iTerm >=2.9.* +*Currently only supported on iTerm2 >=3* See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module. @@ -163,7 +161,7 @@ Default: `true` Type: `string`<br> Default: `process.cwd()` -[Inform iTerm](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click). +[Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click). ## Related |