strip-final-newline

WebJar for strip-final-newline

Лицензия

Лицензия

MIT
Группа

Группа

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

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

strip-final-newline
Последняя версия

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

strip-final-newline
WebJar for strip-final-newline
Ссылка на сайт

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

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

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

https://github.com/sindresorhus/strip-final-newline

Скачать strip-final-newline

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

strip-final-newline Build Status

Strip the final newline character from a string/buffer

Can be useful when parsing the output of, for example, ChildProcess#execFile, as binaries usually output a newline at the end. Normally, you would use stdout.trim(), but that would also remove newlines at the start and whitespace.

Install

$ npm install strip-final-newline

Usage

const stripFinalNewline = require('strip-final-newline');

stripFinalNewline('foo\nbar\n\n');
//=> 'foo\nbar\n'

stripFinalNewline(Buffer.from('foo\nbar\n\n')).toString();
//=> 'foo\nbar\n'

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.

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

Версия
2.0.0