
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
locale-string-summarizer
Advanced tools
Intelligent text summarizer with automatic language detection. Supports English, Spanish, and Russian. Extract keywords or get concise summaries with TypeScript support.
A lightweight TypeScript utility that intelligently summarizes text based on detected language/locale. Automatically detects the language and provides concise summaries or keyword extraction tailored to the specific locale.
npm install locale-string-summarizer
import { summarizeText } from "locale-string-summarizer";
const text =
"This is a very long sentence that contains multiple ideas and concepts. It should be summarized into a shorter version that captures the main points.";
// Basic summarization
const summary = summarizeText(text);
console.log(summary);
// Output: "This is a very long sentence that contains multiple ideas and concepts. It should be summarized into a shorter version that captures the main points."
// Extract only keywords
const keywords = summarizeText(text, { keywordsOnly: true });
console.log(keywords);
// Output: "sentence, contains, multiple, ideas, concepts"
// Custom sentence count
const customSummary = summarizeText(text, { maxSentences: 1 });
console.log(customSummary);
// Output: "This is a very long sentence that contains multiple ideas and concepts."
// Spanish text
const spanishText =
"Este es un texto muy largo en español que contiene múltiples ideas y conceptos.";
const spanishSummary = summarizeText(spanishText);
console.log(spanishSummary);
// Russian text
const russianText =
"Это очень длинный текст на русском языке который должен быть сокращен.";
const russianSummary = summarizeText(russianText);
console.log(russianSummary);
summarizeText(text: string, options?: SummarizerOptions): stringSummarizes the input text based on detected locale.
Parameters:
text (string): The input text to summarizeoptions (SummarizerOptions, optional): Configuration optionsSummarizerOptions:
maxSentences?: number - Maximum number of sentences to return (default: 2)keywordsOnly?: boolean - If true, returns only keywords instead of sentences (default: false)Returns: string - The summarized text or keywords
MIT © Harsh Srivastava
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Intelligent text summarizer with automatic language detection. Supports English, Spanish, and Russian. Extract keywords or get concise summaries with TypeScript support.
The npm package locale-string-summarizer receives a total of 3 weekly downloads. As such, locale-string-summarizer popularity was classified as not popular.
We found that locale-string-summarizer 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.