# copied

> Copy to clipboard in browser.

Latest version **0.1.0** (published 2022-01-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install copied
pnpm add copied
yarn add copied
bun add copied
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-01-15 |
| First published | 2022-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lanyue |
| Maintainers | lanyue |
| Keywords | copied, clipboard |

## Links

- npm: https://www.npmjs.com/package/copied
- Repository: https://github.com/mengdu/copied
- Homepage: https://github.com/mengdu/copied#readme
- Issues: https://github.com/mengdu/copied/issues
- npm.io page: https://npm.io/package/copied

## Recent versions

- 0.1.0 (latest) — 2022-01-15

## README

# Copied

Copy to clipboard in browser.

```sh
npm install copied
```

```js
import copied from 'copied'
const btn = document.getElementById('btn')

btn.addEventListener('click', () => {
    btn.setAttribute('disabled', "true")
    copied('Hello Text !', (err) => {
        if (err) {
            console.error(err)
        } else {
            console.log('Copied !')
            btn.innerText = 'Copied !'
            setTimeout(() => {
                btn.innerText = 'Copy'
                btn.removeAttribute('disabled')
            }, 500)
        }
    })
})
```

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