New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@clemox/ngx-file-saver

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clemox/ngx-file-saver

URL or blob download helper

19.0.0
latest
Source
npm
Version published
Weekly downloads
70
-52.7%
Maintainers
0
Weekly downloads
 
Created
Source

ngx-file-saver

This projet is an inspiration of eligrey FileSave.js.
The library is full compatible with Angular, and it's simple to use.

Source code

Source code can be found on my GitHub.

Browsers

I made some test on following browsers.

BrowserVersion
Firefox80
Google Chrome84
Microsoft Edge Chromium85

Install

npm install @clemox/ngx-file-saver

Usage

  • Import module
import { NgxFileSaverModule } from '@clemox/ngx-file-saver';

@NgModule({ 
    imports: [ NgxFileSaverModule ]
})
  • Declare service
import { NgxFileSaverModule } from '@clemox/ngx-file-saver';

constructor(
    private fileSaver: NgxFileSaverService
) { }
  • Download file or blob
this.fileSaver.saveUrl(url, 'Test.docx');
const blob = new Blob(['Test de blob'], { type: 'text/plain' });
this.fileSaver.saveBlob(blob, 'Test.txt');-

Keywords

angular

FAQs

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