1.0.1 • Published 11 months ago

push-attachment v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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
}
1.0.1

11 months ago

1.0.0

11 months ago