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

file-saver

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-saver

An HTML5 saveAs() FileSaver implementation

  • 2.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1M
increased by8.51%
Maintainers
2
Weekly downloads
 
Created

What is file-saver?

The file-saver package is a solution for client-side file saving. It allows web applications to save files on the client's computer, effectively generating files based on data within the browser. This can be useful for applications that need to export reports, download documents, or save user-generated content without sending data back to a server.

What are file-saver's main functionalities?

Saving text files

This feature allows you to save text files. The code sample demonstrates saving a simple text file named 'hello_world.txt' with the content 'Hello, world!'.

saveAs(new Blob(['Hello, world!'], {type: 'text/plain;charset=utf-8'}), 'hello_world.txt');

Saving binary files

This feature enables the saving of binary files, such as images or documents, in a binary format. The code sample shows how to save a binary file named 'example.bin'.

saveAs(new Blob([binaryData], {type: 'application/octet-stream'}), 'example.bin');

Other packages similar to file-saver

Keywords

FAQs

Package last updated on 19 Nov 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