tinyclip is a concise, cross-platform utility designed to interact with the system clipboard specifically within Node.js environments. It leverages native operating system clipboard functionalities for robust performance. The package is currently at version `0.1.12` and demonstrates an active development cadence, with frequent minor updates addressing features and bug fixes. A key differentiator is its minimalistic design and its exclusive focus on Node.js; starting from version `0.1.11`, `tinyclip` explicitly removed browser support, guiding developers to utilize the native browser Clipboard API for web contexts instead. This makes it an ideal choice for server-side or desktop applications built with Node.js that require reliable clipboard operations without additional heavy dependencies.
npm install tinyclipVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to write a string to the system clipboard and then read its content back, within a Node.js environment.
For browser environments, use the native `navigator.clipboard` API (e.g., `navigator.clipboard.readText()` or `navigator.clipboard.writeText()`).
Ensure your Node.js environment meets the specified version requirements. Update Node.js if necessary to avoid installation or runtime issues.
Always use native browser `Clipboard API` (e.g., `navigator.clipboard.readText()`) for web applications to ensure compatibility and leverage browser security models.
This library is Node.js-only since v0.1.11. For browser applications, use the native `navigator.clipboard` API.
Ensure your Node.js project is configured for ECMAScript Modules (ESM) by setting `"type": "module"` in your `package.json` or by using `.mjs` file extensions, and use `import { readText, writeText } from 'tinyclip';`.No dependency data recorded yet.