New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nteract/epics

Package Overview
Dependencies
Maintainers
18
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nteract/epics

Redux-Observable epics for nteract apps

  • 5.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
18
Created
Source

@nteract/epics

This package contains a set of Redux-Observable epics for use in nteract applications.

Installation

$ yarn add @nteract/epics
$ npm install --save @nteract/epics

Usage

The example below shows how we can use the watchExecutionStateEpic to monitor the state of a recently launched kernel.

import { watchExecutionStateEpic } from "@nteract/epics";

export default () => {
  // Create a Observable for the successful launch of a
  // kernel.
  const action$ = ActionsObservable.of({
      type: actionTypes.LAUNCH_KERNEL_SUCCESSFUL,
      payload: {
        kernel: {
          channels: of({
            header: { msg_type: "status" },
            content: { execution_state: "idle" }
          })
        }
      }
    });
    // Monitor the Observable and update the
    // state of the kernel on our client appropriately.
    const obs = watchExecutionStateEpic(action$);
    obs.pipe(toArray()).subscribe(
      actions => {
        const types = actions.map(({ type }) => type);
        expect(types).toEqual([actionTypes.SET_EXECUTION_STATE]);
      },
      err => done.fail(err), // It should not error in the stream
      () => done()
    );
  });
}

Documentation

We're working on adding more documentation for this component. Stay tuned by watching this repository!

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:epics label.

License

BSD-3-Clause

Keywords

FAQs

Package last updated on 04 Jan 2022

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