Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reacterjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reacterjs

A simple Object that can start a chain of reactions after a chain of events

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Reacter

A simple Object that can start a chain of reactions after a chain of events

The user can define the chain of actions/reactions as a simple string with the following format:

event1 - event2[;timeout] ... > action1[;timer] - action2[;timer] - action3[;timer]

ATTENTION: both the timeout and the timer should have the ms suffix

example:

const Reacter = require('reacter');
let reacter = new Reacter("e1 - e2;30ms > a1 - a2;30ms");
reacter.on('reaction', console.log.bind(console));
reacter.process('e1').process('e2');

In this case when Reacter gets an event e1 followed by and event e2 fired less than 30ms from e1 it will immediatly emit a reaction with a1 followed by a reaction with a2 after ~30ms

FAQs

Package last updated on 21 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc