nano-clipboard

Project nano-clipboard is a nano version for clipboard. Copy it's url.

Install

npm install nano-clipboard 

Then import it.

// import library use script tag.
<script type="text/javascript" src="./index.js"></script>

// or
var nanoClipboard = require('nano-clipboard');

// or
import nanoClipboard from 'nano-clipboard';

Usage

// copy the string into clipboard, when failed, use prompt instead.

nanoClipboard('I will copy `Hello world` to clipboard.', true);

The code of nano-clipboard hosted on Github, click here. Welcome to issue or pull request.