Skip to content

Precompiled @sindresorhus/copy-text-to-clipboard (ES5, still 0.2kB)

License

Notifications You must be signed in to change notification settings

egoist/modern-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-copy

NPM version NPM downloads donate

A precompiled version of sindresorhus/copy-text-to-clipboard, clipboard in modern browsers.

Install

❯ npm install modern-copy

CDN: UNPKG | jsDelivr

Usage

Direct use it in your build process, without any extra config:

import mcopy from 'modern-copy'

button.addEventListener('click', () => {
  mcopy('👌🙋')
  // Must be called in response to a user gesture event, like click or keyup.
})

Or CDN version, access it via window.mcopy:

<script src="https://unpkg.com/modern-copy"></script>

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

modern-copy © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

About

Precompiled @sindresorhus/copy-text-to-clipboard (ES5, still 0.2kB)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published