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.
@geoffcox/binary-search
Advanced tools
This library contains a binary search algorithm written in Typescript.
This package ships in ES and CommonJS module formats along with DTS for typing.
npm install @geoffcox/binary-search
const values = [1,2,3,4,5];
const nearestRange: NearestRange = {};
const compare = (a: number, b: number) => a-b;
const result = binarySearch(4, values, compare, nearestRange);
//expect result to be index of 3 and nearestRange to be [2,4]
Enjoy it at http://geoffcox.github.io/demos/binary-search
FAQs
A modern binary search algorithm in Typscript.
We found that @geoffcox/binary-search 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.