JSPM

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

A tiny utility to interact with the system clipboard.

Package Exports

  • tinyclip

Readme

tinyclip 📋

A tiny cross-platform clipboard library. Uses native OS clipboard functionality on Node.js.

[!NOTE] In the browser, you can use the native Clipboard API instead of a dependency.

Install

npm install tinyclip

Usage

import {readText, writeText} from 'tinyclip';

await writeText('hello world');
const text = await readText();

API

readText(): Promise<string>

Reads text from the clipboard.

writeText(text: string): Promise<void>

Writes text to the clipboard.

License

MIT