Skip to content
JS
Package

detect-newline

Detect the dominant newline character of a string

v4.0.1, 22 Sept 2023MITESM onlyTypes: Bundled
$ npm install detect-newline

Key numbers

As of 25 Sept 2026
Weekly downloads
35.7m
+16% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
3 years ago
v4.0.1
GitHub stars
55
6 forks
Open issues / PRs
0 / 0
Contributors
9
Commits, last 52 weeks
1

Downloads

Last week 2026-09-15 to 2026-09-21
020m40m60mSept 2025Mar 2026Sept 2026High 48.3m (25 Aug 2026)Low 16.7m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

35,669,656 downloads last week, 162,332,706 in the last month. The 12-month change of +16% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
013 in total
Latest version
4.0.1, 22 Sept 20233 years ago
First published
28 Jun 2014
Last push to GitHub
18 Sept 20266 days before the snapshot
Repository archived
No
Open issues
0
Open pull requests
0
Commits, last 52 weeks
1
Dependents on npm
1,152

Major versions

  1. v4 first release 4.0.0, 14 Oct 2021
  2. v3 first release 3.0.0, 11 Apr 2019
  3. v2 first release 2.0.0, 9 Feb 2016
  4. v1 first release 1.0.0, 14 Aug 2014
  5. v0 first release 0.1.0, 28 Jun 2014

Recent releases

VersionPublished
4.0.122 Sept 2023
4.0.014 Oct 2021
3.1.013 Nov 2019
3.0.011 Apr 2019
2.1.016 Feb 2016
2.0.19 Feb 2016
2.0.09 Feb 2016
1.0.316 Feb 2015
1.0.224 Jan 2015
1.0.117 Aug 2014
1.0.014 Aug 2014
0.1.128 Jun 2014
0.1.028 Jun 2014
Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
^12.20.0 || ^14.13.1 || >=16.0.0
Runtimes
-
Unpacked size (npm)
3.9 kB
Dependencies (0)
None
npm install detect-newline
  • jsDelivrhttps://cdn.jsdelivr.net/npm/detect-newline@4.0.1/
  • unpkghttps://unpkg.com/detect-newline@4.0.1/
  • esm.shhttps://esm.sh/detect-newline@4.0.1
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): no category.