slice-ansi

WebJar for slice-ansi

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

slice-ansi
Последняя версия

Последняя версия

2.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

slice-ansi
WebJar for slice-ansi
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/chalk/slice-ansi

Скачать slice-ansi

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/slice-ansi/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>slice-ansi</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/slice-ansi/
implementation 'org.webjars.npm:slice-ansi:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/slice-ansi/
implementation ("org.webjars.npm:slice-ansi:2.1.0")
'org.webjars.npm:slice-ansi:jar:2.1.0'
<dependency org="org.webjars.npm" name="slice-ansi" rev="2.1.0">
  <artifact name="slice-ansi" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='slice-ansi', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "slice-ansi" % "2.1.0"
[org.webjars.npm/slice-ansi "2.1.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : ansi-styles jar [3.2.0,4)
org.webjars.npm : astral-regex jar [1.0.0,2)
org.webjars.npm : is-fullwidth-code-point jar [2.0.0,3)

Модули Проекта

Данный проект не имеет модулей.

slice-ansi Build Status XO: Linted

Slice a string with ANSI escape codes

Install

$ npm install slice-ansi

Usage

const chalk = require('chalk');
const sliceAnsi = require('slice-ansi');

const string = 'The quick brown ' + chalk.red('fox jumped over ') +
	'the lazy ' + chalk.green('dog and then ran away with the unicorn.');

console.log(sliceAnsi(string, 20, 30));

API

sliceAnsi(string, beginSlice, endSlice?)

string

Type: string

String with ANSI escape codes. Like one styled by chalk.

beginSlice

Type: number

Zero-based index at which to begin the slice.

endSlice

Type: number

Zero-based index at which to end the slice.

Related

  • wrap-ansi - Wordwrap a string with ANSI escape codes
  • cli-truncate - Truncate a string to a specific width in the terminal
  • chalk - Terminal string styling done right

Maintainers


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
org.webjars.npm

chalk

Terminal string styling done right

Версии библиотеки

Версия
2.1.0
1.0.0
0.0.4