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

flowbject

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flowbject

Flowbject is a library that allows you to describe state machines with objects.

  • 2.0.1
  • Source
  • npm
  • Socket score

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

Flowbject

Flowbject is a high-level library whose aim is to help with writing state-machine flows. The concept is based on Amazon-State-Language.

It provides a more convenient way to write and manipulate states. The state-machine JSON extraction is encapsulated in hydrators and allows the integration of multiple API languages such as AWS-StepFunctions.

Installation

npm install flowbject

Usage

Here is an example how to build a state-machine and extract the language-specifications to AWS-StepFunctions.

import { StateMachine, Pass, AWSStepFunctionsHydratorManager } from "flowbject";

const stateMachine = new StateMachine({
    autoLink: true,
    comment: 'A Hello World example of the Amazon States Language using a Pass state'
});

const helloWorld = (new Pass('HelloWorld'))
    .result.set('Hello World!')
    .next.end();

stateMachine.states.add(helloWorld);

const manager = new AWSStepFunctionsHydratorManager();

const result = manager.extractStateMachine(stateMachine);

Results:

{
    "Comment": "A Hello Worldexample of the Amazon States Language using a Pass state",
    "StartAt": "HelloWorld",
    "States": {
        "HelloWorld": {
            "Result": "Hello World!",
            "End": true,
            "Type": "Pass"
        }
    }
}

FAQs

Package last updated on 10 Apr 2018

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