Skip to content
JS
Package

trim

Trim string whitespace

v1.0.1, 1 Apr 2021MITCommonJSTypes: None
$ npm install trim
Deprecated on npm
Use String.prototype.trim() instead

Key numbers

As of 25 Sept 2026
Weekly downloads
1.7m
-29% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
5 years ago
v1.0.1
GitHub stars
-
Open issues / PRs
- / -
Contributors
-
Commits, last 52 weeks
-

Downloads

Last week 2026-09-15 to 2026-09-21
01m2m3mSept 2025Mar 2026Sept 2026High 2.9m (21 Oct 2025)Low 946k (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.

1,670,875 downloads last week, 6,575,372 in the last month. The 12-month change of -29% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
05 in total
Latest version
1.0.1, 1 Apr 20215 years ago
First published
12 Mar 2013
Last push to GitHub
-
Repository archived
-
Open issues
-
Open pull requests
-
Commits, last 52 weeks
-
Dependents on npm
-

Major versions

  1. v1 first release 1.0.0, 13 Nov 2020
  2. v0 first release 0.0.1, 12 Mar 2013

Recent releases

VersionPublished
1.0.11 Apr 2021
1.0.013 Nov 2020
0.0.35 Nov 2020
0.0.25 Nov 2020
0.0.112 Mar 2013
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
3.3 kB
Dependencies (0)
None
npm install trim
  • jsDelivrhttps://cdn.jsdelivr.net/npm/trim@1.0.1/
  • unpkghttps://unpkg.com/trim@1.0.1/
  • esm.shhttps://esm.sh/trim@1.0.1
Sources: npm registry, npm downloads API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): deprecated; GitHub data not fetched yet; no category.