Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # slice-ansi [![Build Status](https://travis-ci.org/chalk/slice-ansi.svg?branch=master)](https://travis-ci.org/chalk/slice-ansi) [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/xojs/xo)
  2. > Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)
  3. ## Install
  4. ```
  5. $ npm install slice-ansi
  6. ```
  7. ## Usage
  8. ```js
  9. const chalk = require('chalk');
  10. const sliceAnsi = require('slice-ansi');
  11. const string = 'The quick brown ' + chalk.red('fox jumped over ') +
  12. 'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
  13. console.log(sliceAnsi(string, 20, 30));
  14. ```
  15. ## API
  16. ### sliceAnsi(string, beginSlice, endSlice?)
  17. #### string
  18. Type: `string`
  19. String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).
  20. #### beginSlice
  21. Type: `number`
  22. Zero-based index at which to begin the slice.
  23. #### endSlice
  24. Type: `number`
  25. Zero-based index at which to end the slice.
  26. ## Related
  27. - [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
  28. - [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal
  29. - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
  30. ## Maintainers
  31. - [Sindre Sorhus](https://github.com/sindresorhus)
  32. - [Josh Junon](https://github.com/qix-)
  33. ---
  34. <div align="center">
  35. <b>
  36. <a href="https://tidelift.com/subscription/pkg/npm-slice_ansi?utm_source=npm-slice-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
  37. </b>
  38. <br>
  39. <sub>
  40. Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
  41. </sub>
  42. </div>