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.
@ckirby/sbd
Advanced tools
Split text into sentences with a vanilla
rule based approach (i.e working ~95% of the time).
Use npm:
$ npm install sbd
var tokenizer = require('@ckirby/sbd');
var text = "On Jan. 20, former Sen. Barack Obama became the 44th President of the U.S. Millions attended the Inauguration.";
var sentences = tokenizer.sentences(text, optional_options);
// [
// 'On Jan. 20, former Sen. Barack Obama became the 44th President of the U.S.',
// 'Millions attended the Inauguration.',
// ]
var options = {
"preserve_whitespace" : false,
"abbreviations" : null
};
preserve_whitespace
: Preserve the literal whitespace between words and sentences (otherwise, internal spaces are normalized to a single space char, and inter-sentence whitespace is omitted).abbreviations
: list of abbreviations to override the original ones for use with other languages. Don't put dots in abbreviations.You can run unit tests with npm test
.
If you feel something is missing, you can open an issue stating the problem sentence and desired result. If code is unclear give me a @mention. Pull requests are welcome.
npm install -g browserify
npm run-script build
FAQs
Split text into sentences with Sentence Boundary Detection (SBD).
The npm package @ckirby/sbd receives a total of 50 weekly downloads. As such, @ckirby/sbd popularity was classified as not popular.
We found that @ckirby/sbd demonstrated a healthy version release cadence and project activity because the last version was released less than 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.