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

qiqz

v0.3.0

Published

Simple reactive architecture in javascript

Downloads

1

Readme

basement.js

qiq.js

v0.2

Object based, reactive architecture in javascript.

qiqz is a simple, minimal, easy to use reactive architecture in javascript.

qiqz instances are objects that represent events. They can be interconnected like nodes in a graph. Each qiqz instance object have inputs and outputs connections, to other qiqz instances.

When a qiqz takes some input data, it evaluates it. If its conditions are meet, it fires, passing the data to all qiqz connected to its output.

qiqz objects take input with the qiqz.in( data ) method. If configured conditions are satisfied, the qiqz object fires. The condition is configured by overwriting its on method. The on methods evaluates the input, and if it returns anything, the qiqz "fires" passing the data as its output, to all linked inputs from other qiqz instances.

When a qiqz fires, it triggers connected qiqz objects, passing data to them. Each connected qiqz object has its in method called, with the data. Data flow is unidirectional. qiqz outs are connected to qiqz ins.

The qiqz arquitecture was designed for use in the xoL programming language. It can be used for reactive, dataflow programming, asynchronous programming.

Usage

Create qiqz objects

A qiqz object represents a single event. Create a qiqz object:

// create a qiqz object
var qiqz1 = new qiqz()

Customize

Customize the by modifying the "on" method. The "on" method supplies qiqz objects with input. That input may or may not trigger the qiqz. If the custom "on" method, returns something, the qiqz will "fire", and will send that returned value to all linked qiqzs. To trigger qiqzs without passing any data, simply return true.

// This qiqz will fire if data > 3
qiqz1.on = function( data ) {
  if ( data > 3 ) return data
}

Connect

Connect a qiqz out to another qiqz in. If the first qiqz fires, it calls the on of the second. The second then may also fire. Flow may continue to other connected qiqzs.

// Connects qiqzs in this direction: qiqz1 -> qiqz2
// when qiqz1 fires, it calls qiqz2 "on" method. Which may or may not make
// qiqz2 to fire.
qiqz1.link( qiqz2 )

// remove the previous connection
qiqz1.unlink( qiqz2 )

Pass input data

Use the in method to pass data to a qiqz instance

qiqz1.in( 4 )

If the "on" condition is satisfied, the data qiqz will outputthis data to other connected receiving qiqz (if any).

Read remembered data

If the qiqz object was triggered with the last data, it remembers it. The data can be read as follows:

qiqz1.data == 4        // will evaluate to true

If the qiqz was not triggered by the data, then data property will be set to null.

tests

Basement tests: qiqz tests To run tests, put whole project folder in a web server, then open test/index.html file. The tests will run in browser.

license

MIT license.