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

bindra

v2.1.0

Published

Lightweight reactive data management library for TypeScript applications

Readme

Bindra

CI npm version TypeScript License: MIT

Bindra is a lightweight, reactive data management library for TypeScript applications. It provides a unified API for managing both local and remote data with built-in reactivity, validation, caching, and real-time updates.

✨ Features

  • 🎯 Type-Safe: Full TypeScript support with comprehensive type definitions
  • 🔄 Reactive: Built-in reactivity with signals and reactive objects
  • 🌐 API Ready: Seamless REST API integration with automatic retries
  • Validation: Comprehensive validation system with custom rules
  • 💾 Caching: Smart TTL-based caching to reduce API calls
  • 📄 Pagination: Offset and cursor-based pagination strategies
  • 🔌 Real-time: WebSocket support with auto-reconnect
  • 📦 Zero Dependencies: Pure TypeScript, no external dependencies
  • 🎨 Framework Agnostic: Works with React, Vue, Svelte, or vanilla JS

📦 Installation

npm install bindra
# or
pnpm add bindra
# or
yarn add bindra

🚀 Quick Start

import { DataSource } from 'bindra';

interface User {
  id: number;
  name: string;
  email: string;
}

// Create a DataSource
const users = new DataSource<User>({
  url: '/api/users'
});

// Fetch data
await users.fetch();

// Create a record
const newUser = await users.create({
  name: 'Alice',
  email: '[email protected]'
});

// Update a record
await users.update(1, { name: 'Bob' });

// Delete a record
await users.delete(1);

// Subscribe to changes
users.on('created', (user) => {
  console.log('User created:', user);
});

📚 Documentation

For complete documentation, visit: https://bindra-docs.web.app

💡 Key Concepts

DataSource

The main class for managing data:

const ds = new DataSource<Product>({
  url: '/api/products',
  cache: { enabled: true, ttl: 300000 },
  pagination: { pageSize: 20 }
});

Validation

Built-in validation system:

const users = new DataSource<User>({
  url: '/api/users',
  fields: [
    {
      name: 'email',
      validation: {
        required: true,
        type: 'email'
      }
    },
    {
      name: 'age',
      validation: {
        type: 'number',
        min: 18,
        max: 120
      }
    }
  ]
});

Real-time Updates

WebSocket support for live data:

const messages = new DataSource<Message>({
  url: '/api/messages',
  realtime: {
    enabled: true,
    url: 'wss://api.example.com/ws',
    reconnect: true
  }
});

messages.on('realtime:message', (data) => {
  console.log('New message:', data);
});

🎯 Use Cases

Bindra is perfect for:

  • ✅ CRUD applications
  • ✅ Data-heavy dashboards
  • ✅ Real-time collaborative apps
  • ✅ Forms with validation
  • ✅ Paginated lists
  • ✅ Infinite scroll

🧪 Testing

Bindra is thoroughly tested with 155+ tests:

cd package
pnpm test

📄 License

MIT License - see LICENSE for details

🤝 Contributing

See CONTRIBUTING.md for contribution guidelines.

🔗 Links

📦 What's Included

[email protected]
├── dist/
│   ├── index.js          # Main entry point
│   ├── index.d.ts        # TypeScript definitions
│   ├── core/             # Core modules
│   └── utils/            # Utility functions
├── README.md
├── LICENSE
└── CHANGELOG.md

🚀 Quick Examples

Local Data

const todos = new DataSource<Todo>({
  data: [
    { id: 1, title: 'Learn Bindra', completed: false },
    { id: 2, title: 'Build app', completed: false }
  ]
});

Remote API

const users = new DataSource<User>({
  url: 'https://api.example.com/users',
  cache: { enabled: true, ttl: 300000 }
});

With Validation

const products = new DataSource<Product>({
  url: '/api/products',
  fields: [
    {
      name: 'name',
      validation: { required: true, type: 'string', min: 3 }
    },
    {
      name: 'price',
      validation: { required: true, type: 'number', min: 0 }
    }
  ]
});

Built with ❤️ for the TypeScript community