Gathering detailed insights and metrics for string.prototype.trim
Gathering detailed insights and metrics for string.prototype.trim
Gathering detailed insights and metrics for string.prototype.trim
Gathering detailed insights and metrics for string.prototype.trim
ES5 spec-compliant shim for String.prototype.trim
npm install string.prototype.trim
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
13 Stars
127 Commits
4 Forks
5 Watching
1 Branches
2 Contributors
Updated on 16 Dec 2021
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-5%
5,265,885
Compared to previous day
Last week
2%
30,011,524
Compared to previous week
Last month
7%
125,226,463
Compared to previous month
Last year
119.4%
1,275,978,437
Compared to previous year
An ES5 spec-compliant String.prototype.trim
shim. Invoke its "shim" method to shim String.prototype.trim
if it is unavailable.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec (both ES5 and current).
Most common usage:
1var assert = require('assert'); 2var trim = require('string.prototype.trim'); 3 4assert(trim(' \t\na \t\n') === 'a'); 5 6trim.shim(); // will be a no-op if not needed 7 8assert(trim(' \t\na \t\n') === ' \t\na \t\n'.trim());
Some implementations of String#trim
incorrectly trim zero-width spaces. This shim detects and corrects this behavior.
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More