{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"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"],"dist-tags":{"latest":"2.0.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"ANSI escape codes for manipulating the terminal","readme":"# ansi-escapes [![Build Status](https://travis-ci.org/sindresorhus/ansi-escapes.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-escapes)\n\n> [ANSI escape codes](http://www.termsys.demon.co.uk/vtansi.htm) for manipulating the terminal\n\n\n## Install\n\n```\n$ npm install --save ansi-escapes\n```\n\n\n## Usage\n\n```js\nconst ansiEscapes = require('ansi-escapes');\n\n// Moves the cursor two rows up and to the left\nprocess.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);\n//=> '\\u001B[2A\\u001B[1000D'\n```\n\n\n## API\n\n### cursorTo([x, [y]])\n\nSet the absolute position of the cursor. `x0` `y0` is the top left of the screen.\n\nSpecify either both `x` & `y`, only `x`, or nothing.\n\n### cursorMove(x, [y])\n\nSet the position of the cursor relative to its current position.\n\n### cursorUp(count)\n\nMove cursor up a specific amount of rows. Default is `1`.\n\n### cursorDown(count)\n\nMove cursor down a specific amount of rows. Default is `1`.\n\n### cursorForward(count)\n\nMove cursor forward a specific amount of rows. Default is `1`.\n\n### cursorBackward(count)\n\nMove cursor backward a specific amount of rows. Default is `1`.\n\n### cursorLeft\n\nMove cursor to the left side.\n\n### cursorSavePosition\n\nSave cursor position.\n\n### cursorRestorePosition\n\nRestore saved cursor position.\n\n### cursorGetPosition\n\nGet cursor position.\n\n### cursorNextLine\n\nMove cursor to the next line.\n\n### cursorPrevLine\n\nMove cursor to the previous line.\n\n### cursorHide\n\nHide cursor.\n\n### cursorShow\n\nShow cursor.\n\n### eraseLines(count)\n\nErase from the current cursor position up the specified amount of rows.\n\n### eraseEndLine\n\nErase from the current cursor position to the end of the current line.\n\n### eraseStartLine\n\nErase from the current cursor position to the start of the current line.\n\n### eraseLine\n\nErase the entire current line.\n\n### eraseDown\n\nErase the screen from the current line down to the bottom of the screen.\n\n### eraseUp\n\nErase the screen from the current line up to the top of the screen.\n\n### eraseScreen\n\nErase the screen and move the cursor the top left position.\n\n### scrollUp\n\nScroll display up one line.\n\n### scrollDown\n\nScroll display down one line.\n\n### clearScreen\n\nClear the terminal screen.\n\n### beep\n\nOutput a beeping sound.\n\n### image(input, [options])\n\nDisplay an image.\n\n*Currently only supported on iTerm >=2.9.*\n\nSee [term-img](https://github.com/sindresorhus/term-img) for a higher-level module.\n\n#### input\n\nType: `Buffer`\n\nBuffer of an image. Usually read in with `fs.readFile()`.\n\n#### options\n\n##### width\n##### height\n\nType: `string` `number`\n\nThe width and height are given as a number followed by a unit, or the word \"auto\".\n\n- `N`: N character cells.\n- `Npx`: N pixels.\n- `N%`: N percent of the session's width or height.\n- `auto`: The image's inherent size will be used to determine an appropriate dimension.\n\n##### preserveAspectRatio\n\nType: `boolean`<br>\nDefault: `true`\n\n### iTerm.setCwd([path])\n\nType: `string`<br>\nDefault: `process.cwd()`\n\n[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).\n\n\n## Related\n\n- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ansi-escapes.git"},"users":{"retorillo":true,"leizongmin":true,"yuch4n":true,"unixzii":true},"bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"license":"MIT","versions":{"1.0.0":{"name":"ansi-escapes","version":"1.0.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ansi-escapes"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"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"],"devDependencies":{"ava":"0.0.4","xo":"*"},"gitHead":"59244470a66fa25569347bcf3e9c9968a2229c34","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes","_id":"ansi-escapes@1.0.0","_shasum":"cbc220a180a794525ccf0a85058e314403fe89a5","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cbc220a180a794525ccf0a85058e314403fe89a5","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.1.0":{"name":"ansi-escapes","version":"1.1.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ansi-escapes"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"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"],"devDependencies":{"ava":"0.0.4","xo":"*"},"gitHead":"2775b221ad6b5ce33a8a7ca1d9b59ba7d923b5c8","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes","_id":"ansi-escapes@1.1.0","_shasum":"21608edd3a4fc5a568c3b8d83ed4acc289d5ec77","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"21608edd3a4fc5a568c3b8d83ed4acc289d5ec77","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.1.1":{"name":"ansi-escapes","version":"1.1.1","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ansi-escapes"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"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"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"3dff027c48a59a377ed44b6d942b1b4f007c326f","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes","_id":"ansi-escapes@1.1.1","_shasum":"cc9c0b193ac4c2b99a19f9b9fbc18ff5edd1d0a8","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cc9c0b193ac4c2b99a19f9b9fbc18ff5edd1d0a8","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.2.0":{"name":"ansi-escapes","version":"1.2.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ansi-escapes"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"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"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"38584c66489a9144f83fd29462b3f0018ab2d4b9","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes","_id":"ansi-escapes@1.2.0","_shasum":"9fe306ae90777d4bd58a13c39a1387c14667b46e","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9fe306ae90777d4bd58a13c39a1387c14667b46e","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ansi-escapes-1.2.0.tgz_1457170160083_0.6607096220832318"},"directories":{}},"1.3.0":{"name":"ansi-escapes","version":"1.3.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ansi-escapes"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"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"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"9ecd532e37e888c5ea08cf0cf87e1c4f6e4bd858","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes","_id":"ansi-escapes@1.3.0","_shasum":"070883c337d5e4ce9e124fce2639267f2a14d554","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"070883c337d5e4ce9e124fce2639267f2a14d554","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ansi-escapes-1.3.0.tgz_1457516031370_0.8470738974865526"},"directories":{}},"1.4.0":{"name":"ansi-escapes","version":"1.4.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ansi-escapes.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"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":"*"},"gitHead":"763a11847148479dd315c2b9f81b001c94740415","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes#readme","_id":"ansi-escapes@1.4.0","_shasum":"d3a8a83b319aa67793662b13e761c7911422306e","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d3a8a83b319aa67793662b13e761c7911422306e","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-1.4.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ansi-escapes-1.4.0.tgz_1460925437568_0.228597579523921"},"directories":{}},"2.0.0":{"name":"ansi-escapes","version":"2.0.0","description":"ANSI escape codes for manipulating the terminal","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ansi-escapes.git"},"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":"*"},"gitHead":"5dcd620fd52165650d440152ce49fb3d3c679381","bugs":{"url":"https://github.com/sindresorhus/ansi-escapes/issues"},"homepage":"https://github.com/sindresorhus/ansi-escapes#readme","_id":"ansi-escapes@2.0.0","_shasum":"5bae52be424878dd9783e8910e3fc2922e83c81b","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5bae52be424878dd9783e8910e3fc2922e83c81b","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ansi-escapes/-/ansi-escapes-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ansi-escapes-2.0.0.tgz_1492961578751_0.06489237071946263"},"directories":{}}},"name":"ansi-escapes","time":{"modified":"2017-04-23T15:32:59.037Z","created":"2015-08-14T15:26:46.205Z","1.0.0":"2015-08-14T15:26:46.205Z","1.1.0":"2015-08-17T08:54:15.403Z","1.1.1":"2016-01-10T01:16:26.151Z","1.2.0":"2016-03-05T09:29:21.486Z","1.3.0":"2016-03-09T09:33:54.015Z","1.4.0":"2016-04-17T20:37:19.676Z","2.0.0":"2017-04-23T15:32:59.037Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/ansi-escapes#readme"}