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 🙏

© 2024 – Pkg Stats / Ryan Hefner

thundercats

v3.1.0

Published

RxJS Meets isomorphic Flux

Downloads

38

Readme

Circle CI Coverage Status Join the chat at https://gitter.im/thundercatsjs/thundercats JS.ORG

NPM

ThunderCats.js

ThunderCats, Ho!

Flux meets RxJS

Why

The Flux architecture allows you to think of your application as an unidirectional flow of data, this module aims to facilitate the use of RxJS Observable as basis for defining the relations between the different entities composing your application. This module also implements Universal JavaScript First design. What does that mean? It means the module is designed with the intent to be used both server-side and client-side from the beginning.

How

The main components of Flux are Actions, Stores, and the dispatcher. ThunderCats replaces the dispatcher with RxJS observables and does away with singletons.

Why get rid of the dispatcher? Actions in ThunderCats are observables and observables dispatch themselves to their observers (or listeners) much better then a singleton dispatcher could. And as a bonus, no actions are composable because observables are composable!

What about stores? Store in ThunderCats are also observables that can be composed. They observe, or listen, to actions they are interested directly. No need for it to noop every action.

What about singletons?

ThunderCats uses stampit! Stores, Actions, and Cats (more on this later) are stamp factories that return factories(called stamps).

But why not es6(2015) classes? Everybody's doing it!

If everyone jumped off a bridge would you do it, too? Here are some great articles on why not to use es6 classes or constructors in general.

Tl;DR new and class are broken, and borked.

Wait a second, what are Cats?

A Cat is a bag where you can register your store and actions factories. It is also a stamp factory that creates factories that create instances of a cat. By themselves they are only slightly useful and optional, but combine them with ThunderCats-React and you can do cool things like server-side rendering with data pre-fetching and call render methods using the observable pattern.

Install

npm install thundercats

ThunderCats makes heavy use of es6 Map object. While available in the latest versions of Node.js, io.js and all modern browsers, a great many older browsers will need a polyfill in order to work with ThunderCats.

I recommend using es6-map as a polyfill for just the Map object or babel polyfill to give you all the es6 goodies!

Examples!

Check out:

Docs

Contributing

Commits messages should start with

  • adds
  • changes
  • fixes
  • removes

Use eslint to lint according to the provided .eslintrc file. Add unit tests for new features.