clipboardy

Access the system clipboard (copy/paste)

  • Owner: sindresorhus/clipboardy
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

clipboardy Build Status

Access the system clipboard (copy/paste)

Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with Termux.

Install

$ npm install clipboardy

Usage

const clipboardy = require('clipboardy');

clipboardy.writeSync('?');

clipboardy.readSync();
//=> '?'

API

clipboardy

.write(text)

Write (copy) to the clipboard asynchronously. Returns a Promise.

text

Type: string

The text to write to the clipboard.

.read()

Read (paste) from the clipboard asynchronously. Returns a Promise.

.writeSync(text)

Write (copy) to the clipboard synchronously.

text

Type: string

The text to write to the clipboard.

.readSync()

Read (paste) from the clipboard synchronously.

FAQ

Where can I find the source of the bundled binaries?

The Linux binary is just a bundled version of xsel. The source for the Windows binary can be found here.

Main metrics

Overview
Name With Ownersindresorhus/clipboardy
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2016-12-04 13:14:35
Pushed At2023-10-23 08:10:40
Last Commit At
Release Count21
Last Release Namev4.0.0 (Posted on 2023-10-23 15:10:18)
First Release Namev0.1.0 (Posted on 2016-12-04 14:45:00)
用户参与
Stargazers Count1.8k
Watchers Count14
Fork Count63
Commits Count66
Has Issues Enabled
Issues Count67
Issue Open Count17
Pull Requests Count24
Pull Requests Open Count0
Pull Requests Close Count8
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private