Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
string.prototype.trimright
Advanced tools
A ES2019-spec-compliant String.prototype.trimRight
shim. Invoke its "shim" method to shim String.prototype.trimRight
if it is unavailable.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec. In an ES6 environment, it will also work properly with Symbol
s.
Most common usage:
var trimRight = require('string.prototype.trimright');
assert(trimRight(' \t\na \t\n') === 'a \t\n');
if (!String.prototype.trimRight) {
trimRight.shim();
}
assert(trimRight(' \t\na \t\n ') === ' \t\na \t\n '.trimRight());
Simply clone the repo, npm install
, and run npm test
FAQs
ES2019 spec-compliant String.prototype.trimLeft shim.
The npm package string.prototype.trimright receives a total of 1,956,520 weekly downloads. As such, string.prototype.trimright popularity was classified as popular.
We found that string.prototype.trimright demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.