$ cnpm install @mariozechner/clipboard
Fork of @crosscopy/clipboard
This fork updates to the latest
clipboard-rs(0.3.1) and adds musl (Alpine Linux) support. All credit goes to the original authors.
NPM Package: https://www.npmjs.com/package/@mariozechner/clipboard
GitHub: https://github.com/badlogic/clipboard
This is a clipboard API npm package that allows you to copy and paste data to and from the clipboard. There doesn't seem to be a good clipboard package for node.js (that supports data format beyond text), so I decided to make one. Data Format Supported
- Text
- Image
- Rich Text Format
- Files
- HTML
Detailed API function declarations can be found in the index.d.ts.
Or you can refer to the source code in src/lib.rs.
import Clipboard from "@mariozechner/clipboard";
console.log(await Clipboard.getText());
console.log(await Clipboard.getHtml());
if (await Clipboard.hasImage()) {
console.log(await Clipboard.getImageBase64());
} else {
console.log("No Image");
}
Everything is done with GitHub Action.
Run npm version patch to bump the version.
Then git push --follow-tags to push the changes and tags to GitHub. GitHub Action will automatically build and publish.
Copyright 2013 - present © cnpmjs.org | Home |