Socket
Socket
Sign inDemoInstall

@types/topojson-client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/topojson-client

TypeScript definitions for topojson-client


Version published
Weekly downloads
124K
decreased by-20.75%
Maintainers
1
Weekly downloads
 
Created

What is @types/topojson-client?

@types/topojson-client provides TypeScript type definitions for the topojson-client library, which is used for manipulating and converting TopoJSON data. TopoJSON is an extension of GeoJSON that encodes topology, allowing for more efficient data storage and enabling operations like topology-preserving simplification and merging of shapes.

What are @types/topojson-client's main functionalities?

topojson.feature

Converts a TopoJSON object into a GeoJSON Feature or FeatureCollection. This is useful for rendering or further processing the data in libraries that expect GeoJSON.

const topojson = require('topojson-client');
const topology = { /* TopoJSON data */ };
const geojson = topojson.feature(topology, topology.objects.myObject);

topojson.mesh

Extracts the mesh (lines) from a TopoJSON object, which can be used to render boundaries or other linear features.

const topojson = require('topojson-client');
const topology = { /* TopoJSON data */ };
const mesh = topojson.mesh(topology, topology.objects.myObject);

topojson.merge

Merges multiple TopoJSON geometries into a single geometry, preserving topology. This is useful for combining adjacent shapes into a single shape.

const topojson = require('topojson-client');
const topology = { /* TopoJSON data */ };
const merged = topojson.merge(topology, topology.objects.myObject.geometries);

Other packages similar to @types/topojson-client

FAQs

Package last updated on 16 Sep 2024

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