
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
vscode-fuzzy-scorer
Advanced tools
A shameless rip off of vscode fuzzy scorer algorithm used to search files and stuff
A shameless rip off of vscode fuzzy scorer algorithm used to search files and stuff.
npm install --save vscode-fuzzy-scorer
import { compareFilePathsByFuzzyScore } from 'vscode-fuzzy-scorer';
const sourceA = '/some/path/fileA.txt';
const sourceB = '/some/path/other/fileB.txt';
const sourceC = '/unrelated/some/path/other/fileC.txt';
const query = 'path fileB';
const result = [sourceA, sourceB, sourceC].sort((r1, r2) =>
compareFilePathsByFuzzyScore({ pathA: r1, pathB: r2, query })
);
console.log(result);
/*
Result:
[
'/some/path/other/fileB.txt' // sourceB
'/some/path/fileA.txt' // sourceA
'/unrelated/some/path/other/fileC.txt' // sourceC
]
*/
or
import { scoreFilePathFuzzy } from 'vscode-fuzzy-scorer';
const path = '/xyz/some/path/someFile123.txt';
const query = 'xyz some';
const result = scoreFilePathFuzzy({ path, query });
console.log(result);
/*
Result:
{
"score": 131098,
"labelMatch": [
{
"start": 0,
"end": 4
}
],
"descriptionMatch": [
{
"start": 1,
"end": 4
}
]
}
*/
FAQs
A shameless rip off of vscode fuzzy scorer algorithm used to search files and stuff
The npm package vscode-fuzzy-scorer receives a total of 260 weekly downloads. As such, vscode-fuzzy-scorer popularity was classified as not popular.
We found that vscode-fuzzy-scorer 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.