Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.