node-electron-clipboard

0.2.0 • Public • Published

node-electron-clipboard

Use electron's clipboard api under the hood to bring cross platform writeText and writeImage to node.js

API

type imgType = 'PNG' | 'JPEG'
interface Clipboard {
  writeText(text: string): Promise<boolean>
  writeImage(path: string): Promise<boolean>
  writeImage(img: Buffer): Promise<boolean>
  readText(): Promise<string>
  readImage(type?: imgType): Promise<Buffer> // Use PNG if type is not provided
  clear(type: string): Promise<boolean>
  close(): void
}
type initClipboard = () => Promise<Clipboard>
declare const init: initClipboard
export = init

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    2
  • 0.1.0
    0

Package Sidebar

Install

npm i node-electron-clipboard

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

276 kB

Total Files

11

Last publish

Collaborators

  • maple3142