Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 2, 2024 via pnpm

strip-final-newline 2.0.0

Strip the final newline character from a string/buffer
Package summary
Share
0
issues
1
license
1
MIT
Package created
28 Oct 2018
Version published
28 Oct 2018
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
strip-final-newline@2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of strip-final-newline 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does strip-final-newline do?

The npm package "strip-final-newline" serves a specific function of removing the final newline character from a string or buffer. This can be particularly useful when parsing the output of certain coding elements like ChildProcess#execFile, as many binaries typically output a newline at the end.

How do you use strip-final-newline?

To install and use the "strip-final-newline" package, you first need to install it with the command npm install strip-final-newline. Once the package is installed, you can import and use it in your code as follows:

import stripFinalNewline from 'strip-final-newline';

// Example usage with a string ending with newlines
stripFinalNewline('foo\nbar\n\n');
// The output will be: 'foo\nbar\n'

//Example usage with a Buffer ending with newlines
stripFinalNewline(Buffer.from('foo\nbar\n\n')).toString();
// The output will be also: 'foo\nbar\n'

This way, strip-final-newline helps to clean up your strings or buffers by removing any trailing newline characters.

Where are the strip-final-newline docs?

The documentation for "strip-final-newline" can be found directly in the README on its GitHub repository page, which is https://github.com/sindresorhus/strip-final-newline. Details about the package's usage and functionality are provided there for further reference. Also, there is an option to get professional support for this package with a Tidelift subscription. This subscription can be beneficial for open source sustainers as well as companies who want assurances about their dependencies regarding security, maintenance, and licensing.

All Versions