Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
clipboard-sys
Advanced tools
Readme
Access the system clipboard
Cross-platform!
Supports:
sudo apt-get install xclip
)npm install clipboard-sys
import { clipboard } from './index';
import fs from 'fs';
async function readWriteText() {
await clipboard.writeText('some text');
console.log('text from clipboard:', await clipboard.readText());
}
readWriteText();
async function readWriteImage() {
await clipboard.writeImage('./source.png');
await clipboard.readImage('./destination.png');
await clipboard.writeImage(fs.readFileSync('./source.png')); //buffer
return await clipboard.readImage(); //buffer
}
readWriteImage();
async function copyFiles() {
await clipboard.writeFiles('./source1.txt', './source2.png');
console.log(await clipboard.readFiles());
}
copyFiles();
async function pasteFiles() {
await clipboard.pasteFiles('Copy', './destinationFolder', './source1.png', './source2.png');
await clipboard.pasteFiles('Cut', './destinationFolder', './source1.png', './source2.png');
}
pasteFiles();
export interface SysClipboard {
readText(): Promise<string>;
writeText(text: string): Promise<void>;
readImage(file?: string): Promise<Buffer>;
writeImage(file: string | Buffer): Promise<void>;
readFiles(): Promise<Array<string>>;
pasteFiles(action: 'Copy' | 'Cut', destinationFolder: string, ...files: Array<string>): Promise<void>;
writeFiles(...files: Array<string>): Promise<boolean>;
}
Opened for contribution https://github.com/udarrr/clipboard-sys
FAQs
Cross platform node system clipboard work with text, image, files
The npm package clipboard-sys receives a total of 196 weekly downloads. As such, clipboard-sys popularity was classified as not popular.
We found that clipboard-sys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.