Socket
Book a DemoInstallSign in
Socket

clipd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clipd

Puny copy to clipboard library

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

📎 clipd

Puny 721 byte copy to clipboard library

Package version Downloads Standard Travis Build Standard Readme GitHub version Dependency CI License PRs Donate


Built with ❤︎ by Tiaan and contributors

Table of Contents

Table of Contents
  • About
  • Install
  • Usage
  • API
  • example
  • Contribute
  • License
  • About

    A puny 721 byte(gzipped & minified) copy to clipboard library. For modern browsers.

    Install

    With cdn:

    <script src="https://unpkg.com/clipd/lib/clipd.min.js"></script>
    <!-- Or -->
    <script src="https://rawgit.com/tiaanduplessis/clipd/master/lib/clipd.min.js"></script>
    

    With Bower:

    $ bower install clipd
    

    With npm:

    $ npm install --save clipd
    

    With yarn:

    $ yarn add clipd
    

    Usage

    
    // Works with a string selector or element node
    
    clipd('.selector')
    
    // OR
    
    const elem = document.getElementById('elem')
    clipd(elem)
    
    

    API

    The module exports a single function with signature:

    clipd(selector|elementNode, options)
    

    Current available options:

    {
    	event: 'click', // Event to trigger copy on. Default 'click
    	callback: (result) => {} // callback with the result of copy(boolean)
    }
    

    Example

    Check out the example directory.

    Contribute

    Contributions are welcome. Please open up an issue or create PR if you would like to help out.

    Note: If editing the README, please conform to the standard-readme specification.

    License

    Licensed under the MIT License.

    Keywords

    clipboard

    FAQs

    Package last updated on 02 Apr 2017

    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