pax_global_header00006660000000000000000000000064134605223550014517gustar00rootroot0000000000000052 comment=32accb3425dbcde0b303583b9137857451b67045 restore-cursor-3.1.0/000077500000000000000000000000001346052235500145165ustar00rootroot00000000000000restore-cursor-3.1.0/.editorconfig000066400000000000000000000002571346052235500171770ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.yml] indent_style = space indent_size = 2 restore-cursor-3.1.0/.gitattributes000066400000000000000000000000231346052235500174040ustar00rootroot00000000000000* text=auto eol=lf restore-cursor-3.1.0/.gitignore000066400000000000000000000000271346052235500165050ustar00rootroot00000000000000node_modules yarn.lock restore-cursor-3.1.0/.npmrc000066400000000000000000000000231346052235500156310ustar00rootroot00000000000000package-lock=false restore-cursor-3.1.0/.travis.yml000066400000000000000000000000651346052235500166300ustar00rootroot00000000000000language: node_js node_js: - '12' - '10' - '8' restore-cursor-3.1.0/index.d.ts000066400000000000000000000003111346052235500164120ustar00rootroot00000000000000/** Gracefully restore the CLI cursor on exit. @example ``` import restoreCursor = require('restore-cursor'); restoreCursor(); ``` */ declare function restoreCursor(): void; export = restoreCursor; restore-cursor-3.1.0/index.js000066400000000000000000000003271346052235500161650ustar00rootroot00000000000000'use strict'; const onetime = require('onetime'); const signalExit = require('signal-exit'); module.exports = onetime(() => { signalExit(() => { process.stderr.write('\u001B[?25h'); }, {alwaysLast: true}); }); restore-cursor-3.1.0/index.test-d.ts000066400000000000000000000000671346052235500173770ustar00rootroot00000000000000import restoreCursor = require('.'); restoreCursor(); restore-cursor-3.1.0/license000066400000000000000000000021251346052235500160630ustar00rootroot00000000000000MIT License Copyright (c) Sindre Sorhus (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: 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. restore-cursor-3.1.0/package.json000066400000000000000000000014331346052235500170050ustar00rootroot00000000000000{ "name": "restore-cursor", "version": "3.1.0", "description": "Gracefully restore the CLI cursor on exit", "license": "MIT", "repository": "sindresorhus/restore-cursor", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "scripts": { "test": "xo && tsd" }, "files": [ "index.js", "index.d.ts" ], "keywords": [ "exit", "quit", "process", "graceful", "shutdown", "sigterm", "sigint", "terminate", "kill", "stop", "cli", "cursor", "ansi", "show", "term", "terminal", "console", "tty", "shell", "command-line" ], "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" }, "devDependencies": { "tsd": "^0.7.2", "xo": "^0.24.0" } } restore-cursor-3.1.0/readme.md000066400000000000000000000007611346052235500163010ustar00rootroot00000000000000# restore-cursor [![Build Status](https://travis-ci.org/sindresorhus/restore-cursor.svg?branch=master)](https://travis-ci.org/sindresorhus/restore-cursor) > Gracefully restore the CLI cursor on exit Prevent the cursor you've hidden interactively from remaining hidden if the process crashes. ## Install ``` $ npm install restore-cursor ``` ## Usage ```js const restoreCursor = require('restore-cursor'); restoreCursor(); ``` ## License MIT © [Sindre Sorhus](https://sindresorhus.com)