JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q79722F
  • License MIT

simple mac clipboard for node & electron

Package Exports

  • simple-mac-clipboard

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simple-mac-clipboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

simple-mac-clipboard

simple mac clipboard for node & electron

npm version npm downloads npm license

Install

$ npm i -S simple-mac-clipboard

API

based on https://developer.apple.com/documentation/appkit/nspasteboard

const clip = require('simple-mac-clipboard')

Note

  • for read & write, format is required, and format is always the first argument
  • for write, the boolean return value is for success or not, map from objc YES or NO

clear

export function clear(): void

clear the clipboard

readBuffer & writeBuffer

export function readBuffer(format: string): Buffer
export function writeBuffer(format: string, data: Buffer): boolean

read or write Buffer from/to the clipboard

readText & writeText

export function readText(format: string): string
export function writeText(format: string, text: string): boolean

read or write text from/to the clipboard

Changelog

CHANGELOG.md

License

the MIT License http://magicdawn.mit-license.org