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.
benchrunner
Advanced tools
npm install benchrunner
bower install benchrunner
You can write a suite like this:
(function(root) {
var suites = root.benchrunner.suites;;
suites.push(Benchmark.Suite('trim')
.add('String.replace', function() {
' foo '.replace(/^\s+|\s+$/g, '');
})
.add('String.trim', function() {
' foo '.trim();
})
);
}(typeof global == 'object' && global || this));
Now you can run them from CLI or in the browser really easy:
Currently only PhantomJS is supported.
phantomjs benchrunner.js suite1.js suite2.js
From the root of your project, that would become e.g.:
phantomjs ./node_modules/benchrunner/benchrunner.js benchmarks/my-suite.js
Or, if you install globally (i.e. npm install -g benchrunner
):
benchrunner benchmarks/my-suite.js
Just point your browser at the runner page, e.g.
http://localhost/your-project/benchmarks/index.html
See examples/basic.html
for an example (you need to include a few scripts).
Heavily inspired by Lo-Dash's benchmark suite runner.
FAQs
Benchmark Suite Runner for benchmark.js
The npm package benchrunner receives a total of 0 weekly downloads. As such, benchrunner popularity was classified as not popular.
We found that benchrunner 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.