clear_line.js 425 B

12345678910111213141516171819202122
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. /**
  6. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  7. *
  8. * This source code is licensed under the MIT license found in the
  9. * LICENSE file in the root directory of this source tree.
  10. *
  11. *
  12. */
  13. /* global stream$Writable */
  14. exports.default = stream => {
  15. if (process.stdout.isTTY) {
  16. stream.write('\x1b[999D\x1b[K');
  17. }
  18. };