Licence
MIT
Version
1.0.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0
push-attachment
Tiny library for pushing attachments to browser
How to use
npm i push-attachment
import pushAttachment from "./push-attachment.js"
pushAttachment("Hello!", {attachmentName: "hello.doc", contentType: "text/html;charset=utf-8"})
See example at dist/index.html
Arguments:
declare const pushAttachment: (data: string /* like "Hello!"*/, options: PushAttachmentOptions /* See Below*/) => void;
interface PushAttachmentOptions {
contentType: string // like "text/html;charset=utf-8"
attachmentName: string // like my.doc
}