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

@ludoows/weave

v0.8.0

Published

A modern TypeScript reactive library that makes any existing HTML reactive without compilation, custom attributes, or Virtual DOM

Readme

Weave

A modern TypeScript reactive library that makes any existing HTML reactive without compilation, custom attributes, or Virtual DOM.

Features

  • Zero Markup Pollution: No custom attributes in HTML - all configuration is in pure TypeScript
  • Progressive Enhancement: Start simple, add complexity only when needed
  • Bidirectional Sync: model() creates automatic two-way binding between inputs and refs
  • Type Safety: Full TypeScript strict mode with complete type inference
  • Performance First: Lazy resolution, surgical observers, automatic batching
  • Store System: Global reactive state management with actions and computed properties
  • Lifecycle Hooks: onInit, onUpdate, onDestroy for complete control
  • Advanced Features: Promise integration, template rendering, head management, page transitions
  • teleport(): Move elements to any DOM target (modals, tooltips)
  • dispatch(): Emit custom events between components without a shared store
  • $refs(): Access DOM elements by weave-ref attribute without CSS selectors
  • nextTick(): Execute code after the current reactive cycle
  • [weave-cloak]: Hide elements until Weave is ready, no flash of un-initialized content

Installation

npm / yarn

npm install @ludoows/weave
yarn add @ludoows/weave

CDN

<!-- unpkg -->
<script src="https://unpkg.com/@ludoows/weave"></script>

<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@ludoows/weave"></script>

Quick Start

import { weave } from '@ludoows/weave';

weave('#app', ({ $, ref }) => {
  const count = ref(0);
  
  $('#counter').text(() => `Count: ${count.value}`);
  $('#increment').on('click', () => count.value++);
});

Documentation

Core Concepts

Reactive State with ref()

weave('#app', ({ ref }) => {
  const name = ref('World');
  const count = ref(0);
  
  // Refs are reactive - changes trigger updates
  name.value = 'Weave';
  count.value++;
});

Computed Properties

weave('#app', ({ ref, computed }) => {
  const firstName = ref('John');
  const lastName = ref('Doe');
  
  computed('fullName', () => `${firstName.value} ${lastName.value}`);
  
  // Access via proxy
  console.log(instance.fullName); // "John Doe"
});

DOM Directives

weave('#app', ({ $, ref }) => {
  const message = ref('Hello');
  const isVisible = ref(true);
  
  $('#output').text(() => message.value);
  $('#container').show(() => isVisible.value);
  $('#title').addClass('active');
  $('#input').bind('value', () => message.value);
});

Store System

import { createStore } from '@ludoows/weave';

const counterStore = createStore('counter', ({ state, action, computed }) => {
  state({ count: 0 });
  
  computed('double', (s) => s.count * 2);
  
  action('increment', (s) => s.count++);
  action('decrement', (s) => s.count--);
});

weave('#app', ({ store }) => {
  store(counterStore);
  
  // Access store state
  console.log(counterStore.state.count);
  
  // Call actions
  counterStore.actions.increment();
});

Lifecycle Hooks

weave('#app', ({ ref, onInit, onUpdate, onDestroy, cleanup }) => {
  const data = ref(null);
  
  onInit(async (state) => {
    // Initialize after all refs/computed are resolved
    data.value = await fetchData();
  });
  
  onUpdate((newState, oldState) => {
    // Called after every state change
    console.log('State changed:', newState);
  });
  
  onDestroy((state) => {
    // Called before destruction
    console.log('Cleaning up');
  });
  
  cleanup(() => {
    // Release resources
  });
});

Browser Compatibility

Weave requires modern browser features:

  • Proxy (ES2015)
  • MutationObserver
  • AbortController (for promise cancellation)

Supported browsers:

  • Chrome/Edge 49+
  • Firefox 18+
  • Safari 10+

Development

# Install dependencies
npm install

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Build
npm run build

# Development mode
npm run dev

Contributing

Contributions are welcome! Please read our Contributing Guide for details on:

  • Development setup and workflow
  • Coding standards and best practices
  • Testing guidelines
  • Commit message conventions
  • Pull request process

We appreciate all contributions, from bug reports to new features!

License

MIT