push-attachment
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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
}

Readme

Keywords

Package Sidebar

Install

npm i push-attachment

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.26 kB

Total Files

6

Last publish

Collaborators

  • timmson