New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tiny-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-clipboard

a text copy library

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

tiny-clipbord

Introduction

A tiny copy to clipboard library, without any dependence. It is small(only 1.04k) and Simple to use in javascript.

Features

  • small
  • simple
  • useful
  • support typescript

Usage

# install
npm install tiny-clipboard --save
import TinyClipbord from 'tiny-clipbord'

TinyClipbord.copy(text, callback)

or you can use it by script tag

<script src="https://unpkg.com/tiny-clipbord@0.0.3/libs/tiny-clipbord.umd.min.js"></script>
<script>
   TinyClipbord.copy(text, callback) 
</script>

Methods

  • TinyClipbord.copy(text, callback)

    • text: the text you want to copy

    • callback(error ?) After copying successfully it will be run, and when appear error that will throw the error

  • TinyClipbord.getHistory()

    • return String[], the history that you have copied
  • TinyClipbord.clearHistroy() clear the history

Browser Support

ChromeFirefoxSafariOperaEdgeInternet Explorer logo
42+ ✔41+ ✔10+ ✔29+ ✔12+ ✔9+ ✔

Contributing

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.

License

MIT Licensed © suporka

Questions or advise

If you have some question or advise, you can send me a E-mail(zxpscau@163.com).

Keywords

clipboard

FAQs

Package last updated on 08 Dec 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