New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@perspective-dev/client

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perspective-dev/client

Streaming query engine for data grids, pivot tables and charts over large, real-time datasets — WebAssembly in the browser, native in Node.js, or remote over WebSocket.

Source
npmnpm
Version
5.7.0
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@perspective-dev/client

npm

Perspective is an open-source data grid, pivot table and charting component for large, real-time and streaming datasets.

@perspective-dev/client is the JavaScript and TypeScript API for Perspective's streaming query engine. The same Client connects to an engine running in a Web Worker (WebAssembly), in-process in Node.js, or remotely over WebSocket to a Python, Node.js or Rust server. It provides:

  • Table, a columnar, optionally indexed store which accepts Apache Arrow, CSV and JSON, and streams update() and remove() calls in real time. With page_to_disk, a Table pages its columns to disk (OPFS in the browser) to exceed memory.
  • View, an incrementally-maintained query over a Table: group_by, split_by pivots, aggregates, filters, sorts and columnar expressions.
  • Reactive joins across tables.
  • Virtual servers for DuckDB and ClickHouse, which translate View configurations into native SQL.

Installation

npm install @perspective-dev/client @perspective-dev/server

Usage

import perspective from "@perspective-dev/client";
import CLIENT_WASM from "@perspective-dev/client/dist/wasm/perspective-js.wasm";
import SERVER_WASM from "@perspective-dev/server/dist/wasm/perspective-server.wasm";

await perspective.init({
    client: fetch(CLIENT_WASM),
    server: fetch(SERVER_WASM),
});

const worker = await perspective.worker();
const table = await worker.table({ region: "string", sales: "float" });
const view = await table.view({
    group_by: ["region"],
    columns: ["sales"],
    aggregates: { sales: "sum" },
});

view.on_update(async () => console.log(await view.to_json()));
await table.update([{ region: "West", sales: 12.5 }]);

In Node.js the engine runs in-process, and the module exports the API directly:

const perspective = require("@perspective-dev/client");
const table = await perspective.table(data);

To render a Table as a data grid, pivot table or chart, see @perspective-dev/viewer.

Documentation

Keywords

perspective

FAQs

Package last updated on 05 Nov 2026

Related posts