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

mle-tools-node

v1.16.4

Published

some node tools

Readme

🛠️ mle-tools-node

A collection of Node.js utilities and tools for building applications

TypeScript License: MIT Version CI

🌟 Features

  • 🚀 High-Performance Task Processing

    • Direct execution
    • Thread-based processing
    • Queue management with retry capabilities
  • 💾 Advanced Caching

    • In-memory LRU cache
    • Redis integration
    • Flexible cache middleware
  • 📊 Monitoring & Metrics

    • CPU usage tracking
    • Performance metrics
    • Time tracking middleware
  • 📝 Logging & Debugging

    • Winston-based logging
    • Daily rotating log files
    • Customizable log levels
    • ELK stack integration for log visualization
  • 🔧 Utility Tools

    • Secure property management
    • CSV processing with fast-csv
    • HTTP requests with axios
    • Configuration management

📦 Installation

npm install mle-tools-node

📚 Documentation

For detailed documentation, please read the specifications.

🚀 Quick Start

import {Logger, Cache, WorkerProcessor} from 'mle-tools-node';

// Set up logging
const logger = new Logger('my-app');
logger.info('Application started');

// Use caching
const cache = new Cache();
await cache.set('key', 'value', 3600); // Cache for 1 hour
const value = await cache.get('key');

// Process tasks
const worker = new WorkerProcessor();
await worker.push('myTask', async () => {
    // Your task logic here
});

🔧 Configuration

The library can be configured through environment variables or a configuration file:

import {Config} from 'mle-tools-node';

const config = {
    cache: {
        type: 'redis',
        ttl: 3600
    },
    logging: {
        level: 'info',
        rotation: true
    }
};

Config.initialize(config);

🧪 Testing

Run the test suite:

npm test

Run with coverage:

npm run test:coverage

Run ELK stack integration tests:

npm run test:elk

The test:elk command provides fully automated ELK (Elasticsearch, Logstash, Kibana) stack setup and verification:

  • Force Recreation: Completely rebuilds ELK stack with latest configurations
  • Volume Verification: Validates mounted log directories (/app/logs/sample:ro and /app/logs/mle-tools:ro)
  • Integration Testing: Runs logger tests to generate real application logs
  • Index Validation: Confirms logs are properly indexed in Elasticsearch with correct @timestamp mapping
  • ILM Compliance: Verifies Index Lifecycle Management policies are correctly applied
  • Kibana Integration: Automatically creates index patterns and provides direct visualization URLs
  • Health Monitoring: Comprehensive health checks for all ELK components

Recent Improvements (v1.14.2):

  • ✅ Enhanced thread event handlers in Launcher with proper cleanup to prevent memory leaks
  • ✅ Increased process max listeners to prevent warnings when using multiple workers
  • ✅ Improved logging consistency with "(mtn)" prefix across CacheMiddleware and LoggerPerf
  • ✅ Updated Logstash configuration for better log processing

For detailed ELK integration documentation, see src/logger/logstash/README.md.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

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

📈 Release History

See Changelog for a detailed version history.

🏗️ Built With

🙋‍♂️ Support

For support, please raise an issue in the GitHub repository or contact the maintainers.


Made with ❤️ by mle