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

@progress/kendo-file-saver

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-file-saver

Kendo UI File Saving Helper

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76K
decreased by-53.54%
Maintainers
1
Weekly downloads
 
Created

What is @progress/kendo-file-saver?

@progress/kendo-file-saver is a utility package that provides functionalities for saving files on the client-side. It is particularly useful for web applications that need to export data to files such as text, JSON, or binary formats.

What are @progress/kendo-file-saver's main functionalities?

Save Text File

This feature allows you to save a plain text file. The code creates a Blob object containing the text 'Hello, world!' and then uses the saveAs function to prompt the user to save the file as 'hello.txt'.

const { saveAs } = require('@progress/kendo-file-saver');
const blob = new Blob(['Hello, world!'], { type: 'text/plain;charset=utf-8' });
saveAs(blob, 'hello.txt');

Save JSON File

This feature allows you to save a JSON file. The code creates a Blob object containing a JSON string representation of a JavaScript object and then uses the saveAs function to prompt the user to save the file as 'data.json'.

const { saveAs } = require('@progress/kendo-file-saver');
const data = { name: 'John', age: 30 };
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
saveAs(blob, 'data.json');

Save Binary File

This feature allows you to save a binary file. The code creates an ArrayBuffer and fills it with some binary data, then creates a Blob object from the ArrayBuffer and uses the saveAs function to prompt the user to save the file as 'binary.bin'.

const { saveAs } = require('@progress/kendo-file-saver');
const arrayBuffer = new ArrayBuffer(8);
const view = new Uint8Array(arrayBuffer);
for (let i = 0; i < view.length; i++) {
  view[i] = i * 2;
}
const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' });
saveAs(blob, 'binary.bin');

Other packages similar to @progress/kendo-file-saver

Keywords

FAQs

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