Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@capacitor/clipboard
Advanced tools
The Clipboard API enables copy and pasting to/from the system clipboard.
The Clipboard API enables copy and pasting to/from the system clipboard.
npm install @capacitor/clipboard
npx cap sync
import { Clipboard } from '@capacitor/clipboard';
const writeToClipboard = async () => {
await Clipboard.write({
string: "Hello World!"
});
};
const checkClipboard = async () => {
const { type, value } = await Clipboard.read();
console.log(`Got ${type} from clipboard: ${value}`);
};
write(options: WriteOptions) => Promise<void>
Write a value to the clipboard (the "copy" action)
Param | Type |
---|---|
options | WriteOptions |
Since: 1.0.0
read() => Promise<ReadResult>
Read a value from the clipboard (the "paste" action)
Returns: Promise<ReadResult>
Since: 1.0.0
Represents the data to be written to the clipboard.
Prop | Type | Description | Since |
---|---|---|---|
string | string | Text value to copy. | 1.0.0 |
image | string | Image in Data URL format to copy. | 1.0.0 |
url | string | URL string to copy. | 1.0.0 |
label | string | User visible label to accompany the copied data (Android Only). | 1.0.0 |
Represents the data read from the clipboard.
Prop | Type | Description | Since |
---|---|---|---|
value | string | Data read from the clipboard. | 1.0.0 |
type | string | Type of data in the clipboard. | 1.0.0 |
FAQs
The Clipboard API enables copy and pasting to/from the system clipboard.
The npm package @capacitor/clipboard receives a total of 28,413 weekly downloads. As such, @capacitor/clipboard popularity was classified as popular.
We found that @capacitor/clipboard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.