strip-eof

WebJar for strip-eof

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

strip-eof
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

strip-eof
WebJar for strip-eof
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/strip-eof

Download strip-eof

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

strip-final-newline

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.

Versions

Version
1.0.0