0
点赞
收藏
分享

微信扫一扫

node-copy-paste.js:一个读写系统剪贴板的工具


A command line utility that allows read/write (i.e copy/paste) access to the system clipboard.

支持OSX、Linux、Windows

另一个下载量更大的库:​​clipboardy​​

文档

  • github​​https://github.com/xavi-/node-copy-paste​​
  • npmjs​​https://www.npmjs.com/package/copy-paste​​

安装

npm install

示例

import ncp from "copy-paste";

// 向剪切板写入内容
ncp.copy("some text", function () {
// complete...
});

// 从剪切板读取内容
let res = ncp.paste();
console.log(res);

参考
​​​Node.js 复制至剪贴板​​


举报

相关推荐

0 条评论