Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

universal-clipboard

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-clipboard

粘贴板快捷操作能力实现

  • 1.2.0
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

universal-clipboard npm

粘贴板快捷操作能力实现

支持

browser weex miniApp wechatMiniprogram quickApp

安装

$ npm install universal-clipboard --save

使用

import Clipboard from 'universal-clipboard';

// 快应用中的引入方法
// import Clipboard from 'universal-clipboard/lib/quickapp;

Clipboard.readText().then(text => {

}).catch(() => {

});
// 不支持Web端
Clipboard.writeText('text').then(() => {

}).catch(() => {

});

方法

readText(): Promise.<text>

获取剪贴板数据

支持

weex miniApp wechatMiniprogram quickApp

出参
成员类型描述默认值
textstring剪贴板数据-

writeText(text: string): Promise.<>

设置剪贴板数据

支持

browser weex miniApp wechatMiniprogram quickApp

参数
成员类型描述默认值
textstring设置剪贴板数据-

Keywords

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc