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

elimelt

v0.1.0

Published

TypeScript client SDK for the elimelt.com API

Readme

elimelt

TypeScript client SDK for the elimelt.com API.

Installation

npm install elimelt
# or
yarn add elimelt
# or
pnpm add elimelt

Quick Start

import { Client } from 'elimelt';

const client = new Client('https://blink.tail8ab50a.ts.net');

// Check API health
const health = await client.health();
console.log(health); // { status: 'ok', redis: 'connected' }

// Get system stats
const system = await client.system();
console.log(system.uptime);

API Reference

Initialization

// Simple
const client = new Client('https://your-api-url.com');

// With options
const client = new Client({
  baseUrl: 'https://your-api-url.com',
  wsBaseUrl: 'wss://your-api-url.com', // Optional, derived from baseUrl
  timeout: 30000, // Request timeout in ms
  headers: { 'X-Custom-Header': 'value' },
});

Health & System

// Health check
const health = await client.health();

// System information
const system = await client.system();

Visitors

// Get active visitors and recent visits
const visitors = await client.visitors.list();
console.log(visitors.active_count);
console.log(visitors.active_visitors);
console.log(visitors.recent_visits);

// Get visitor analytics
const analytics = await client.visitors.analytics({
  start_date: '2024-01-01',
  end_date: '2024-12-31',
  limit: 100,
});

// Get analytics summary
const summary = await client.visitors.analyticsSummary();

// Real-time visitor updates
const subscription = client.visitors.subscribe({
  onJoin: (visitor) => console.log('New visitor:', visitor),
  onLeave: (ip) => console.log('Visitor left:', ip),
  onOpen: () => console.log('Connected'),
  onClose: () => console.log('Disconnected'),
});

// Later: close the connection
subscription.close();

Chat

// Get chat history
const history = await client.chat.history('general', {
  limit: 50,
  before: '2024-01-01T00:00:00Z',
});

// Get chat analytics
const analytics = await client.chat.analytics('general');
console.log(analytics.messages, analytics.senders);

// Real-time chat subscription
const subscription = client.chat.subscribe('general', {
  onMessage: (msg) => console.log(`${msg.sender}: ${msg.text}`),
  onPresence: (event) => console.log(event.type, event),
  onOpen: () => console.log('Connected to chat'),
});

// Send a message (via the WebSocket)
subscription.send({
  type: 'message',
  sender: 'username',
  text: 'Hello, world!',
});

Notes

// List all notes
const notes = await client.notes.list({ limit: 20, offset: 0 });

// Get a specific note
const note = await client.notes.get(123);
console.log(note.document.title, note.document.content);

// Search notes
const results = await client.notes.search({
  q: 'typescript',
  use_semantic: true,
});

// Get tags and categories
const tags = await client.notes.tags();
const categories = await client.notes.categories();

// Filter by category or tag
const byCategory = await client.notes.byCategory('programming');
const byTag = await client.notes.byTag('javascript');

Events

// Get event history
const events = await client.events.list({
  topic: 'visitors',
  type: 'join',
  limit: 100,
});

When2Meet

// Create a new event
const { id } = await client.when2meet.createEvent({
  name: 'Team Meeting',
  description: 'Weekly sync',
  dates: ['2024-03-01', '2024-03-02', '2024-03-03'],
  time_slots: ['09:00', '10:00', '11:00', '14:00', '15:00'],
  creator_name: 'Alice',
});

// Get event details
const event = await client.when2meet.getEvent(id);
console.log(event.event.name);
console.log(event.availabilities);
console.log(event.summary); // slot -> count mapping

// Set availability
await client.when2meet.setAvailability(id, {
  participant_name: 'Bob',
  available_slots: ['2024-03-01T09:00', '2024-03-01T10:00'],
});

TypeScript Support

This package is written in TypeScript and includes full type definitions. All API responses are fully typed.

import type {
  Visitor,
  ChatMessage,
  NoteDocument,
  VisitorAnalyticsResponse,
} from 'elimelt';

License

MIT