Strip-final-newline is a small utility that removes only the final newline character from a string or Uint8Array, leaving other trailing whitespace intact. It is useful when parsing command output, such as fixing an extra newline at the end of stdout without removing all trailing newlines and spaces.
Project status
- The repository is not actively maintained based on evidence, with the most recent upstream push on 2024-10-28, and the last listed package update v4.0.0 on 2023-12-13, which is several months before today.
- Apparent update cadence is low, there is a long gap between the major updates (v4.0.0 in 2023, v3.0.0 in 2021, v2.0.0 in 2018), with no recent updates visible in the provided history.
AI summary generated
Recent updates
v4.0.0
v4.0.0 updates strip-final-newline to require Node.js 18+, and adds TypeScript typings. It also changes the Uint8Array path to improve performance by returning a view rather than copying the underlying bytes.
BreakingFeaturesv3.0.0
v3.0.0 introduces breaking platform and module-system changes. You must use a newer Node.js runtime and migrate consumers to ESM, as the package is now pure ESM.
Breakingv2.0.0
Release v2.0.0 was published on 2018-10-28, but no release notes were provided by the publisher. As a result, no documented API, behavior, or migration changes can be reliably extracted from the release description.