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

hyperscript-rxjs

v1.3.26

Published

A js UI library that uses rxjs to handle dom directly.

Readme

Hyperscript-RxJS

A reactive JavaScript UI library that uses RxJS for direct DOM manipulation with observable data binding.

License: LGPL v3

Features

  • Reactive DOM Elements: Create HTML elements with built-in RxJS observable support
  • Comprehensive HTML Support: Functions for all standard HTML elements (div, span, input, etc.)
  • Advanced Data Binding: Two-way binding for forms, tabs, and other UI components
  • Observable Utilities: Specialized classes like ObservableArray for reactive collections
  • Deep Data Handling: Deep class for nested observable structures
  • Type Safe: Full TypeScript support with detailed type definitions
  • RxJS 7.8.2 Integration: Full compatibility with latest RxJS version

Installation

npm install [email protected]

Quick Start

Basic Element Creation

import { div, h1, textNode } from 'hyperscript-rxjs';
import { BehaviorSubject } from 'rxjs';

const title$ = new BehaviorSubject('Hello World');
const app = div(
  h1(textNode(title$))
);

document.body.appendChild(app);

Reactive Form Controls

import { textbox, checkbox, button } from 'hyperscript-rxjs';
import { BehaviorSubject } from 'rxjs';

const name$ = new BehaviorSubject('');
const active$ = new BehaviorSubject(true);

const form = div(
  textbox({ value: name$ }),
  checkbox({ checked: active$ }),
  button('Submit')
);

Core API Overview

Element Creation

Functions for all HTML elements:

a(), abbr(), address(), article(), aside(), audio(), 
button(), div(), form(), h1()-h6(), input(), 
select(), table(), textarea(), video(), ...and more

Specialized Components

  • tabControl() - Reactive tab components with BehaviorSubject binding
  • textbox(), checkbox(), radio(), select(), multiselect() - Form controls with two-way binding
  • numberbox() - Numeric input with observable binding
  • ObservableArray - Reactive array with change notifications (insertBefore$, removeChild$, replaceChild$)
  • Deep - Nested observable data structures with advanced manipulation methods
  • collapse() - Observable-controlled visibility
  • flip() - Toggle between two elements based on observable
  • choice() - Dynamic element display based on observable value

Reactive Utilities

  • bindTabIndex() - Tab navigation binding with BehaviorSubject
  • pipeEvent() - RxJS-powered event handling pipelines
  • subscribeProp() - Bind observables to element properties
  • pickBehaviorSubject() - Extract BehaviorSubject values from nested objects
  • restore() - Deep observable updates for complex state management

Data Transformation

  • Comparer - Advanced sorting and collection utilities with custom comparison
  • queryStringify - Query string serialization

Advanced Usage

Custom Element Extensions

All elements support RxJS extensions:

const btn = button('Click me')
  .pipeEvent('click', click$ => 
    click$.subscribe(() => console.log('Clicked!'))
  .subscribeEvent('mouseover', 
    () => console.log('Mouse over'));

Observable Arrays

const items = new ObservableArray<string>(()=>"");
items.insertBefore('New Item');
items.action$.subscribe(change => {
  console.log('Array changed:', change);
});

Deep Nested Observables

const deepData = new Deep([
  [['user', 'name'], 'John'],
  [['user', 'age'], 30]
]);

deepData.entries.forEach(([path, value]) => {
  console.log(`Path: ${path.join('.')}, Value: ${value}`);
});

Dependencies

  • RxJS 7.8.2

License

LGPL-3.0-or-later

Repository

GitHub Repository

Author

cuishengli
Email: [email protected]