🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

behavior-graph

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

behavior-graph

**Behavior Graph** is a software library that greatly enhances our ability to program **user facing software** and **control systems**. Programs of this type quickly scale up in complexity as features are added. Behavior Graph directly addresses this com

1.0.0-beta.0
Source
npm
Version published
Weekly downloads
3
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Behavior Graph

Behavior Graph is a software library that greatly enhances our ability to program user facing software and control systems. Programs of this type quickly scale up in complexity as features are added. Behavior Graph directly addresses this complexity by shifting more of the burden to the computer. It works by offering the programmer a new unit of code organization called a behavior. Behaviors are blocks of code enriched with additional information about their stateful relationships. Using this information, Behavior Graph enforces safe use of mutable state, arguably the primary source of complexity in this class of software. It does this by taking on the responsibility of control flow between behaviors, ensuring they are are run at the correct time and in the correct order.

Is it any good?

Yes

Documentation

Introduction to Behavior Graph

Behavior Graph Programming Guide

Example

To run the example project, clone the repo, and run npm install from the examples/browser directory first.

Requirements

Node/NPM & Typescript

Installation

If you are using Node/NPM, simply add the following dependency to your package.json:

  "dependencies": {
    "behavior-graph": "~0.5"
  }

Then access the object through an import or require

import * as bg from 'behavior-graph';

Or, if you want to import directly into the browser

<script src="https://cdn.jsdelivr.net/npm/behavior-graph/lib/behavior-graph.min.js" />

Then the following should run in node or the browser

let g = new bg.Graph();
let e = new bg.Extent(g);
let m = new bg.Moment(e);
e.makeBehavior([m], null, (extent) => {
   console.log("Hello, World!"); 
});

e.addToGraphWithAction();

g.action(null, () => {
    m.update();
});

License

Behavior Graph is available under the Apache 2.0 license. See the LICENSE file for more info.

FAQs

Package last updated on 30 Nov 2021

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