1.1.5 • Published 1 year ago

vir-line v1.1.5

Weekly downloads
-
License
(MIT or CC0 1.0)
Repository
github
Last release
1 year ago

vir-line

An assembly line or pipeline that automatically aggregates each of its stages into a final state object type and supports scoped state listeners.

Demo

Usage

Here's a simple example that defines a stage, constructs and then starts a VirLine instance. See the TypeScript types for further options.

Each stage is intended to directly mutate the state object that it is given.

import {VirLine, VirLineStage} from 'vir-line';

const countStage: VirLineStage<{count: number}> = {
    executor({state}) {
        state.count++;
    },
    stageId: {
        name: 'counter',
    },
};

const virLine = new VirLine(
    [
        countStage,
    ],
    {
        count: 0,
    },
);

virLine.startUpdateLoop();
1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.0

1 year ago