Detects the dominant newline character in a string or buffer. This package is essential for ensuring consistent line endings across different operating systems and environments. It helps standardize text processing, configuration file parsing, and other tasks where newline character consistency is critical. detect-newline is lightweight, fast, and accurately identifies the prevalent newline character (LF, CR, or CRLF), simplifying cross-platform text manipulation in Node.js and JavaScript projects.
The npm package detect-newline has irregular release frequency. Initial releases occurred in 2014-2016, followed by periods of inactivity. A release occurred in April and November 2019 and again in October 2021. The most recent release was in September 2023. There have been no releases since.
Detect-newline npm package downloads show a generally increasing trend from March 2024 to July 2025, peaking at 165 million. August 2025 downloads are lower at 130 million, but incomplete, marking a potential downturn after steady growth.