# modern-copy

> Precompiled sindresorhus/copy-text-to-clipboard

Latest version **1.0.3** (published 2017-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install modern-copy
pnpm add modern-copy
yarn add modern-copy
bun add modern-copy
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-10-23 |
| First published | 2017-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | egoist |
| Maintainers | rem |

## Links

- npm: https://www.npmjs.com/package/modern-copy
- Repository: https://github.com/egoist/modern-copy
- Homepage: https://github.com/egoist/modern-copy#readme
- Issues: https://github.com/egoist/modern-copy/issues
- npm.io page: https://npm.io/package/modern-copy

## Recent versions

- 1.0.3 (latest) — 2017-10-23
- 1.0.0 — 2017-05-22

## README

# modern-copy

[![NPM version](https://img.shields.io/npm/v/modern-copy.svg?style=flat)](https://npmjs.com/package/modern-copy) [![NPM downloads](https://img.shields.io/npm/dm/modern-copy.svg?style=flat)](https://npmjs.com/package/modern-copy) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)

> A precompiled version of [sindresorhus/copy-text-to-clipboard](https://github.com/sindresorhus/copy-text-to-clipboard), clipboard in modern browsers.

## Install

```bash
❯ npm install modern-copy
```

CDN: [UNPKG](https://unpkg.com/modern-copy/dist/) | [jsDelivr](https://cdn.jsdelivr.net/npm/modern-copy/dist/)

## Usage

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

```js
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`:

```html
<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](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by egoist with help from contributors ([list](https://github.com/egoist/modern-copy/contributors)).

> [egoistian.com](https://egoistian.com) · GitHub [@egoist](https://github.com/egoist) · Twitter [@rem_rin_rin](https://twitter.com/rem_rin_rin)

---
_Source: https://npm.io/package/modern-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
