npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sxyzdevv/txtscan

v0.0.6-rc

Published

module yang melakukan scanner kepada text yang anda berikan

Readme

@sxyzdevv/txtscan

npm version License: MIT TypeScript

A lightweight, powerful text analysis library for JavaScript and TypeScript applications. Analyze text content for sentiment, readability, keywords, and more with minimal setup.

Features

  • Comprehensive Analysis: Get word count, sentence count, paragraph count in one call
  • Keyword Extraction: Automatically identify the most important keywords in a text
  • Sentiment Analysis: Determine if text has positive, negative, or neutral sentiment
  • Readability Scoring: Calculate how easy or difficult a text is to read
  • Performance Optimized: Designed for speed and minimal memory footprint
  • Zero Dependencies: No external dependencies required
  • TypeScript Ready: Full type definitions included

Installation

# Using npm
npm install @sxyzdevv/txtscan

# Using yarn
yarn add @sxyzdevv/txtscan

# Using pnpm
pnpm add @sxyzdevv/txtscan

Quick Start

import { analyzeText } from '@sxyzdevv/txtscan';

const text = `
Hari ini adalah hari yang cerah. Matahari bersinar terang di langit biru.
Burung-burung berkicau dengan riang. Saya merasa sangat bahagia hari ini.
`;

const analysis = analyzeText(text);
console.log(analysis);

Output:

{
  wordCount: 19,
  sentenceCount: 4,
  paragraphCount: 1,
  topKeywords: ['hari', 'cerah', 'matahari', 'bersinar', 'terang'],
  sentiment: 'positive',
  readability: {
    score: 83,
    level: 'Mudah dibaca'
  }
}

API Reference

analyzeText(text: string)

Performs a comprehensive analysis of the provided text.

Parameters:

  • text (string): The text to analyze

Returns: An object containing:

  • wordCount: Total number of words
  • sentenceCount: Total number of sentences
  • paragraphCount: Total number of paragraphs
  • topKeywords: Array of the 5 most frequently used meaningful words
  • sentiment: Sentiment classification ('positive', 'negative', or 'neutral')
  • readability: Object containing readability metrics
    • score: Readability score (0-100)
    • level: Readability level ('Mudah dibaca', 'Sedang', or 'Sulit dibaca')

Extended Example

import { analyzeText } from '@sxyzdevv/txtscan';

// Analyze an article
const article = `
# Pentingnya Menjaga Kesehatan Mental

Kesehatan mental sama pentingnya dengan kesehatan fisik. Banyak orang yang mengabaikan kondisi mental mereka. Padahal, kesehatan mental yang baik dapat meningkatkan produktivitas dan kualitas hidup.

Ada beberapa cara untuk menjaga kesehatan mental:

1. Istirahat yang cukup
2. Olahraga teratur
3. Meditasi
4. Mengembangkan hobi
5. Bersosialisasi dengan orang lain

Jika Anda merasa tertekan atau cemas, jangan ragu untuk berkonsultasi dengan ahli kesehatan mental. Meminta bantuan bukan tanda kelemahan, melainkan tanda bahwa Anda cukup kuat untuk mengakui keterbatasan diri.
`;

console.log(analyzeText(article));

Customization

You can extend or modify the behavior of txtscan by importing and using the individual analysis modules:

import { getSentiment } from '@sxyzdevv/txtscan/sentiment';
import { getReadability } from '@sxyzdevv/txtscan/readability';

// Custom text analysis
function myCustomAnalysis(text) {
  return {
    // Basic analysis
    sentiment: getSentiment(text),
    readability: getReadability(text),
    
    // Your custom metrics
    // ...
  };
}

Roadmap

  • [ ] Add support for more languages
  • [ ] Improve sentiment analysis with machine learning
  • [ ] Add text summarization feature
  • [ ] Add topic modeling
  • [ ] Support for entity recognition

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by various text analysis libraries and techniques
  • Special thanks to contributors and the open-source community