# abc-copy

> abc-copy is an tool that helps you copy text to your clipboard

Latest version **0.0.11** (published 2020-08-14) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2020-08-14 |
| First published | 2020-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | swain_wong |
| Maintainers | swainwong |
| Keywords | copy, js, clipboard |

## Links

- npm: https://www.npmjs.com/package/abc-copy
- npm.io page: https://npm.io/package/abc-copy

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.11 (latest) — 2020-08-14
- 0.0.10 — 2020-08-14
- 0.0.9 — 2020-08-14
- 0.0.8 — 2020-08-14
- 0.0.6 — 2020-08-13
- 0.0.5 — 2020-08-13
- 0.0.4 — 2020-08-13
- 0.0.3 — 2020-07-23
- 0.0.2 — 2020-07-23
- 0.0.1 — 2020-07-23

## README

# abc-copy
`version 0.01`      

abc-copy is a browser tools that helps you to copy text using `navigator.clipboard` API and TextRange simulation copy.    



## install
```bat
$ npm install abc-copy
```

## import
```js
const abcCopy = require('abc-copy')
```


## demo

```js
const abcCopy = require('abc-copy')

// normal copy(not in modal)
abcCopy('content')
```

```html
<div class="modal" id="modal-content-id"></div>

<script>
// copy in an modal
abcCopy('content', {
  target: document.getElementById('modal-content-id')
})
</script>
```

## api
#### params
* `content <string> ` the text you want to copy to your clipboard.
* `option <object>（optional）`  
     * target: A HtmlDomElement that mounted the hidden TextRange when using the TextRange strategy.Default value is `document.body`
#### return
* `Promise<void>` indicating the result of the copy action, resolve means success while reject means failure.

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