1.0.1 • Published 2 years ago
push-attachment v1.0.1
push-attachment
Tiny library for pushing attachments to browser
How to use
npm i push-attachmentimport 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
}