Skip to content

cloudcmd/clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async Clipboard NPM version Dependency Status Build Status Coverage Status

Async clipboard api uses navigator.clipboard if available or smallest polyfill in the world.

Install

npm i @cloudcmd/clipboard

API

writeText(str)

Write text to clipboard.

const clipboard = require('@cloudcmd/clipboard');

clipboard.writeText('hello')
    .then(console.log)
    .catch(console.error);

License

MIT