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

reventex

v0.0.3

Published

A Functional Reactive Game Engine

Downloads

3

Readme

Build Status Coverage Status npm version GitHub license

A Functional Reactive Game Engine

NPM

Reventex is published on NPM with full typing support. To install use

npm install reventex

This will allow you to import Reventex entirely using:

import { Bus, Client } from 'reventex/server';

Event-driven architecture

Bus

The Bus is a one-to-many communication and implements a publish/subscribe event distribution model. A publisher sends a event on a channel. Any active subscriber listening on that channel receives the event. Subscribers can register interest in wildcard channels.

Client (Subscriber/Publisher)

Subscribers express interest in one or more channels, and only receive events that are of interest, without knowledge of what publishers there are.

Events sent by other clients to these channels will be pushed by Bus to all the subscribed clients.

A client subscribed to one or more channels should not issue commands, although it can subscribe and unsubscribe to and from other channels. The replies to subscription and unsubscription operations are sent in the form of events, so that the client can just read a coherent stream of events where the first element indicates the type of event. The commands that are allowed in the context of a subscribed client are:

  • publish(event: Event): Void

  • subscribe(channel: String): Void

  • unsubscribe(channel: String): Void

  • match(pattern: Pattern, generator: Generator): Void

  • exit(): Void

  • delay(ms: Int): Void

  • call(callback: Function, ...args): Void

type Event = { 
    channel: String,
    type: String,
    payload: Object,    
}
type Pattern = { channel: String } | { type: String }

Channel Naming Conventions

Channel names, including reply channel names, are case-sensitive and must be non-empty alphanumeric strings with no embedded whitespace, and optionally token-delimited using the dot character (.), e.g.:

FOO, BAR, foo.bar, foo.BAR, FOO.BAR and FOO.BAR.BAZ are all valid channel names

FOO. BAR, foo. .bar and foo..bar are not valid channel names

Reventex supports the use of wildcards in channel subscriptions.

  • The asterisk character (*) matches any token at any level of the channel.
  • The greater than symbol (>), also known as the full wildcard, matches one or more tokens at the tail of a channel, and must be the last token. The wildcarded channel foo.> will match foo.bar or foo.bar.baz.1, but not foo.
  • Wildcards must be separate tokens (foo.*.baz or foo.> are syntactically valid; foo*.bar, f*o.b*r and foo> are not) For example, the wildcard subscriptions foo.*.quux and foo.> both match foo.bar.quux, but only the latter matches foo.bar.baz. With the full wildcard, it is also possible to express interest in every channel that may exist in Reventex.

Github Issues

Please use Github Issues to report bugs or request features.

Reporting bugs

Please follow these steps to report a bug

  1. Search for related issues - search the existing issues so that you don't create duplicates

  2. Create a testcase - Please create the smallest isolated testcase that you can that reproduces your bug

  3. Share as much information as possible - everything little helps, OS, node/browser version, all that stuff.

Pull Requests

If you are contributing a bug-fix or a very minor addition, feel free to do a pull request on the master branch.

If it is something else create a new (or existing) feature branch (eg: feature/my-feature) and issue a pull request on that.

If unsure, create an issue to discuss.

Contact us

License

Reventex is released under the MIT License.