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

pattern-collector-anyjs-story

v1.24.10

Published

A powerful, configurable tool to scan JavaScript/ESM files and pull structured line matches using custom regular expressions.

Readme

pattern-collector-anyjs-story 🔍

A fast, automated routing and pattern extraction tool to quickly generate and manage server endpoints.

npm version license

🔗 Quick Links:


🚀 Installation

npm install pattern-collector-anyjs-story

❓ Why Use This Repository?

This tool allows developers to create server routing in a short amount of time. Instead of manually writing boilerplate code for API endpoints, this library scans your JavaScript files, pulls out existing routing structures, and automatically updates or builds route files.

  • Primary Use Case: API Routing and Route Generation
  • Target Files: end-point.js, routes.js, app.js

🚀 How It Works (Step-by-Step)

1. Generating Endpoints (endpoint.js)

When you run forEndpoint.js inside version-controlled subfolders (e.g., under /V15/), the tool scans your configuration and updates or builds the endpoint.js file automatically.

What happens when executed:

  1. Open your terminal.
  2. Navigate to your project folder under the target version (e.g., /test/V15/).
  3. Run node ./test/v15/forEndPoints.js.
  4. The system updates key sections in endpoint.js (specifically lines and related blocks), embedding the newly mapped routes.

2. Generating Routes (routes.js)

When you run routes.js, it automatically processes controller functions and constructs the corresponding routing configurations.

What happens when executed:

  1. Open your terminal.
  2. Run node ./test/v15/forRoutesEnd.js.
  3. The file routes.js gets generated or updated automatically, adding the newly created route instances directly into your code structure.

📖 Features

  • ⚡ Fast Routing: Reduces manual labor when creating and organizing server endpoints.
  • 🏷️ Line & Story Tracking: Tracks exact line numbers where patterns appear and traces import-to-consumption flow.
  • 📊 Line Index Resolvers: Automatically calculates starting (firstLineIndex) and ending (lastLineIndex) lines for imports, usages, and exports.
  • 📦 Native ESM Support: Built directly for modern JavaScript / ES Modules.

⚖️ License

MIT License. Designed with ❤️ by KeshavSoft.