Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@types/d3-delaunay
Advanced tools
The @types/d3-delaunay package provides TypeScript type definitions for the d3-delaunay library, which is a JavaScript library for computing Delaunay triangulations and Voronoi diagrams. These type definitions allow TypeScript developers to use d3-delaunay in their projects with the benefits of type checking and code autocompletion.
Delaunay Triangulation
This feature allows you to compute the Delaunay triangulation of a set of points. The 'triangles' property of the Delaunay object contains the indices of the points forming the triangles.
import { Delaunay } from 'd3-delaunay';
const points = [[0, 0], [1, 0], [0, 1], [1, 1]];
const delaunay = Delaunay.from(points);
const triangles = delaunay.triangles;
Voronoi Diagram
This feature allows you to compute the Voronoi diagram from a Delaunay triangulation. The 'voronoi' method creates the Voronoi layout, and 'cellPolygons' generates the polygons for each cell.
import { Delaunay } from 'd3-delaunay';
const points = [[0, 0], [1, 0], [0, 1], [1, 1]];
const delaunay = Delaunay.from(points);
const voronoi = delaunay.voronoi([0, 0, 960, 500]);
const diagram = voronoi.cellPolygons();
This package is part of the D3.js library and is used to compute Voronoi diagrams. It is similar to d3-delaunay but is an older module that has been superseded by d3-delaunay in D3 version 5 and above.
A minimalistic JavaScript library for computing Voronoi diagrams. It is not as feature-rich as d3-delaunay and does not integrate with D3.js for visualization purposes.
npm install --save @types/d3-delaunay
This package contains type definitions for d3-delaunay (https://github.com/d3/d3-delaunay).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-delaunay.
These definitions were written by Bradley Odell, and Nathan Bierema.
FAQs
TypeScript definitions for d3-delaunay
The npm package @types/d3-delaunay receives a total of 1,964,159 weekly downloads. As such, @types/d3-delaunay popularity was classified as popular.
We found that @types/d3-delaunay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.