Precompiled @sindresorhus/copy-text-to-clipboard (ES5, still 0.2kB)
MIT License
A precompiled version of sindresorhus/copy-text-to-clipboard, clipboard in modern browsers.
❯ npm install modern-copy
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>
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
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