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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ephaptic/client

v0.1.3

Published

The universal JavaScript client for ephaptic.

Downloads

476

Readme

What is ephaptic?

Nah, just kidding. It's an RPC framework.

ephaptic — Call your backend straight from your frontend. No JSON. No latency. No middleware.

Getting Started

  • Ephaptic is designed to be invisible. Write a function on the server, call it on the client. No extra boilerplate.

  • Plus, it's horizontally scalable with Redis (optional), and features extremely low latency thanks to msgpack.

  • Oh, and the client can also listen to events broadcasted by the server. No, like literally. You just need to add an eventListener. Did I mention? Events can be sent to specific targets, specific users - not just anyone online.

What are you waiting for? Let's go.

Client:

pip install ephaptic

Server:

pip install ephaptic[server]
from fastapi import FastAPI # or `from quart import Quart`
from ephaptic import Ephaptic

app = FastAPI() # or `app = Quart(__name__)`

ephaptic = Ephaptic.from_app(app) # Finds which framework you're using, and creates an ephaptic server.

You can also specify a custom path:

ephaptic = Ephaptic.from_app(app, path="/websocket")

And you can even use Redis for horizontal scaling!

ephaptic = Ephaptic.from_app(app, redis_url="redis://my-redis-container:6379/0")

Now, how do you expose your function to the frontend?

@ephaptic.expose
async def add(num1, num2):
    return num1 + num2

Yep, it's really that simple.

But what if your code throws an error? No sweat, it just throws up on the frontend with the same details.

And, want to say something to the frontend?

await ephaptic.to(user1, user2).notification("Hello, world!", priority="high")

To use with a framework / Vite:

npm install @ephaptic/client

Then:

import { connect } from "@ephaptic/client";

const client = connect(); // Defaults to `/_ephaptic`.

Or, you can use it with a custom URL:

const client = connect({ url: '/ws' });
const client = connect({ url: 'wss://my-backend.deployment/ephaptic' });

You can even send auth objects to the server for identity loading.

const client = connect({ url: '...', auth: { token: window.localStorage.getItem('jwtToken') } })

Or, to use in your browser:

<script type="module">
import { connect } from 'https://cdn.jsdelivr.net/npm/@ephaptic/client@latest/+esm';

const client = connect();
</script>

License