2.0.0 • Published 7 years ago

@nio/topic-grapher v2.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Installation

$ npm install @nio/topic-grapher

Usage

import graph from '@nio/topic-grapher';

type ServiceName = string;
type Topic = string;

const services = await fetch(servicesUrl).then(r => r.json());
const blocks = await fetch(blocksUrl).then(r => r.json());

const result = graph(services, blocks)
result.nodes // => Array<ServiceName>
result.edges // => Array<[ServiceName, ServiceName, Topic]>

Trace

const result = graph(services, blocks)
const trace = result.trace('ServiceA', 'ServiceD');

trace.services // Set<ServiceName>
trace.paths    // Array<Array<ServiceName>>
2.0.0

7 years ago

1.4.0

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago