New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gephi/gephi-lite-broadcast

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gephi/gephi-lite-broadcast

A browser library to control a Gephi Lite instance using the Broadcast Channel API

0.6.1
latest
Source
npm
Version published
Maintainers
0
Created
Source

@gephi/gephi-lite-broadcast

The package @gephi/gephi-lite-broadcast is a browser TypeScript library to control a Gephi Lite instance using the Broadcast Channel API.

It exports a Driver class, that exposes various asynchronous methods to help feed Gephi Lite data, appearance settings, filters...

Here is a simple example to import a Graphology graph in Gephi Lite in a new tab:

import { GephiLiteDriver } from "@gephi/gephi-lite-broadcast";
import Graph from "graphology";

async function openGraphInGephiLite(graph: Graph) {
  const driver = new GephiLiteDriver();

  await new Promise<void>((resolve) => {
    // Wait for new instance to be fully working:
    driver.on("newInstance", () => {
      resolve();
    });
    driver.openGephiLite();
  });

  await driver.importGraph(graph.toJSON());

  driver.destroy();
}

TODO

1. Data update/reading:

  • getGraph(): SerializedFullGraph / importGraph(graph: FullGraph)
  • setGraphDataset / getGraphDataset / mergeGraphDataset
  • setGraphAppearance / getGraphAppearance / mergeGraphAppearance
  • setFilters / getFilters
  • setSelection / getSelection

2. Other methods:

  • ping (to check broadcast status)
  • getVersion
  • zoomToNodes / resetZoom
  • computeMetric
  • computeLayout / startLayout / stopLayout
  • notify
  • exportGraph
  • methods to handle UI elements (right panel, left tabs, caption, fullscreen)

3. Events

  • instanceCreation
  • graphUpdate
  • graphModelUpdate
  • graphAppearanceUpdate
  • filtersUpdate
  • selectionUpdate

FAQs

Package last updated on 27 Feb 2025

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