You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 months ago | |
|---|---|---|
| .. | ||
| dist | 4 months ago | |
| LICENSE | 4 months ago | |
| README.md | 4 months ago | |
| package.json | 4 months ago | |
README.md
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.