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

d3-fetch

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-fetch

Convenient parsing for Fetch.

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7M
increased by3.01%
Maintainers
2
Weekly downloads
 
Created

What is d3-fetch?

The d3-fetch module provides a convenient way to fetch resources asynchronously, such as text files, JSON data, and binary files, using promises. It is part of the D3.js library, which is widely used for data visualization. d3-fetch simplifies the process of loading external data into your web applications, making it easier to integrate and manipulate this data within your D3 visualizations.

What are d3-fetch's main functionalities?

Fetching Text Files

This feature allows you to fetch and read text files. The code sample demonstrates how to load a text file and log its contents to the console.

d3.text('path/to/your/file.txt').then(function(data) { console.log(data); });

Fetching JSON Data

This feature enables you to fetch and parse JSON data. The code sample shows how to load JSON data and log it to the console, making it easy to integrate into your visualizations or data processing logic.

d3.json('path/to/your/data.json').then(function(data) { console.log(data); });

Fetching Binary Files

This feature is used for fetching binary files, such as images or other binary data. The code sample demonstrates how to load a binary file and log the Blob object to the console.

d3.blob('path/to/your/file.bin').then(function(blob) { console.log(blob); });

Other packages similar to d3-fetch

Keywords

FAQs

Package last updated on 05 Jun 2021

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