Socket
Book a DemoInstallSign in
Socket

@eggplantio/eai-model

Package Overview
Dependencies
Maintainers
11
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eggplantio/eai-model

Library to create and modify Eggplant AI models

latest
npmnpm
Version
4.0.1
Version published
Weekly downloads
485
22.78%
Maintainers
11
Weekly downloads
 
Created
Source

EGGPLANT AI MODEL

Library to create and manipulate Eggplant AI models.

Quick start

To create a blank model and add a bunch of state/actions to it:

import { createAction } from 'eai-model/action'
import { createState, STATE_TYPES } from 'eai-model/state'
import { createModel, addState, addAction, connect } from 'eai-model/model'

let m = createModel('foo')
const s = createState('Login', STATE_TYPES.normal)
m = addState(m, s)

const a1 = createAction('Enter username', s.id)
m = addAction(m, a1)
const a2 = createAction('Enter password', s.id)
m = addAction(m, a2)
const a3 = createAction('Submit', s.id)
m = addAction(m, a3)

const s2 = createState('Search')
m = addState(s2)

m = connect(m, a3.id, s2.id)

Keywords

eggplantai

FAQs

Package last updated on 03 Dec 2019

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