Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A package to help finding the best known string match amongst a soup of input strings
Use a variety of string similarity functions to find the best string in a group of strings.
import { StringSoup } from 'stringsoup';
const stringSoup = new StringSoup([
'London',
'Washington',
'Mumbai',
'Sydney',
'Tokyo',
'Moscow',
'Neverland',
]);
const result = stringSoup.matchSoup('wshng');
/*
{
best: {
token: 'wshng',
match: { knownString: 'Washington', score: 0.7333333333333334 }
},
all: [
{
token: 'wshng',
match: { knownString: 'Washington', score: 0.7333333333333334 }
}
]
}
*/
const result = stringSoup.matchSoup(
'I like to visit lndon, but I live elsewhere'
);
/*
{
best: {
token: 'lndon,',
match: { knownString: 'London', score: 0.6527777777777778 }
},
all: [
{
token: 'lndon,',
match: { knownString: 'London', score: 0.6527777777777778 }
},
{
token: 'to',
match: { knownString: 'Tokyo', score: 0.5666666666666667 }
},
{
token: 'elsewhere',
match: { knownString: 'Neverland', score: 0.5555555555555555 }
},
{
token: 'visit',
match: { knownString: 'Washington', score: 0.5222222222222221 }
},
{ token: 'but', match: { knownString: 'Mumbai', score: 0.5 } },
{
token: 'like',
match: { knownString: 'Tokyo', score: 0.48333333333333334 }
},
{
token: 'live',
match: { knownString: 'Sydney', score: 0.47222222222222215 }
},
{ token: 'I', match: { knownString: 'London', score: 0 } },
{ token: 'I', match: { knownString: 'London', score: 0 } }
]
}
*/
sanitize
tokenize
FAQs
A package to help finding the best known string match amongst a soup of input strings
The npm package stringsoup receives a total of 1 weekly downloads. As such, stringsoup popularity was classified as not popular.
We found that stringsoup 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.