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

cap-socket

v0.0.10

Published

Functions developed by Cap to establish real-time and persistent communication with the server using SocketIO and SignalR services.

Readme

CAP

Manage RealTime Socket Connection Between Client/Server in CAPSocket package manager:

Last Testing With Nuxt Version : 3.13.0

Sponsors

Background

In the past, for two-way communication between the client and the server in each project and each version in the frontend, we needed to write a large amount of code to do this communication. This process was time-consuming and also created problems for developers with different experiences. It was decided to prepare a complete package of all the company's requirements and provide it to the company's developers.

Getting Started

Installation

Installing Package To Your Project With :

  • pnpm Package Manager :
 pnpm install cap-socket latest
  • OR npm Package Manager :
 npm install cap-socket latest
  • OR yarn Package Manager :
 yarn add cap-socket latest

Then, add cap-socket to the modules section of your Nuxt configuration:

export default defineNuxtConfig({
  modules: ['cap-socket']
})

ExternalConfigFile

You can save the settings related to the project in a separate file outside Nuxt.Config.ts file. For this, create a file called cap_socket_config.json in the public folder and enter the following values :

{
    "socket": {
        "type": "signalr",
            "url": "http://192.168.100.9:3001/playgroundHub",
            "debug": true,
            "reconnectAttempts": 10,
            "reconnectDelay": 2,
            "reconnectDelayMax": 15,
            "timeout": 20
    }
}

The advantage of this work is that when the output from the project is prepared and placed on the server, you can change the settings related to the connection to the BackEnd without the need to prepare a new output.

Setting

| Key | Type | Default | Description | |---------------------------------------|-----------|----------|-------------------------------------------------------------------------------------------------------------------------------| | type | string | signalr | Specifies the type of communication package (SignalR or SocketIO) | | url | string | `` | Address of the server managing socket connections (for SignalR along with the HUB address) | | debug | boolean | true | Debugging | | reconnectAttempts | number | 10 | Number of attempts to reconnect to the socket server | | reconnectDelay | number | 2 | Number of attempts to reconnect to the socket server | | reconnectDelayMax | number | 15 | Reconnect delay (in seconds) | | timeout | number | 20 | Wait time to establish a connection |

Thank You

Thanks to all colleagues of CAP Company

Author : Ahmad Ghanavati