Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vis-data

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vis-data

Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.

  • 6.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
150K
increased by6.11%
Maintainers
4
Weekly downloads
 
Created

What is vis-data?

The vis-data npm package is a data management library that provides a way to manage and manipulate data sets. It is part of the vis.js suite of visualization tools and is particularly useful for handling data in a structured and efficient manner, making it easier to integrate with visualization components.

What are vis-data's main functionalities?

DataSet

The DataSet class allows you to create a collection of items. You can add, update, and remove items, and retrieve them in various ways. This is useful for managing data that will be visualized or manipulated.

const { DataSet } = require('vis-data');
const data = new DataSet();
data.add({ id: 1, text: 'item 1' });
data.add({ id: 2, text: 'item 2' });
console.log(data.get());

DataView

The DataView class allows you to create a filtered or transformed view of a DataSet. This is useful for creating different perspectives on the same data without duplicating it.

const { DataSet, DataView } = require('vis-data');
const data = new DataSet([
  { id: 1, text: 'item 1', group: 'A' },
  { id: 2, text: 'item 2', group: 'B' }
]);
const view = new DataView(data, { filter: item => item.group === 'A' });
console.log(view.get());

Event Handling

The DataSet class supports event handling, allowing you to listen for changes to the data. This is useful for reacting to data changes in real-time, such as updating a visualization when the underlying data changes.

const { DataSet } = require('vis-data');
const data = new DataSet();
data.on('*', (event, properties, senderId) => {
  console.log('Event:', event, 'Properties:', properties, 'SenderId:', senderId);
});
data.add({ id: 1, text: 'item 1' });

Other packages similar to vis-data

Keywords

FAQs

Package last updated on 27 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc