New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-saga

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-saga

Implementation of SAGA pattern in JavaScript.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Saga Pattern for distributed transactions

Implementation of SAGA pattern in JavaScript.

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.12 or higher is required.

Installation is done using the npm install command:

$ npm install simple-saga

How to use it

var saga = new Saga({});
saga
  .addTask({ id: "createOrder", transaction: fn1, compensation: cp1 })
  .addParallelTasks(
    { id: "bookAuto", transaction: fn2 },
    { id: "buyTicket", transaction: fn3, compensation: cp3 }
  )
  .addTask({ id: "reserveHotel", transaction: fn4, compensation: cp4 });
  
saga.run({ startAt: dateStart, endAt: dateEnd });

FAQs

Package last updated on 28 Jan 2020

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