# react-native-advanced-clipboard

> Advanced clipboard for react native

Latest version **1.1.0** (published 2022-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-advanced-clipboard
pnpm add react-native-advanced-clipboard
yarn add react-native-advanced-clipboard
bun add react-native-advanced-clipboard
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-07-19 |
| First published | 2018-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Bell |
| Maintainers | magicismight, sohobloo, bellzhong |
| Keywords | clipboard, react, native, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-advanced-clipboard
- Repository: https://github.com/shimohq/react-native-advanced-clipboard
- Homepage: https://github.com/shimohq/react-native-advanced-clipboard#readme
- Issues: https://github.com/shimohq/react-native-advanced-clipboard/issues
- npm.io page: https://npm.io/package/react-native-advanced-clipboard

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2022-07-19
- 1.0.5 — 2021-05-07
- 1.0.4 — 2020-09-29
- 1.0.3 — 2020-09-29
- 1.0.2 — 2019-09-17
- 1.0.1 — 2019-09-17
- 1.0.0 — 2019-09-17
- 0.1.2 — 2018-08-14
- 0.1.1 — 2018-03-09
- 0.1.0 — 2018-03-09

## README

# react-native-advanced-clipboard

Advanced clipboard for react native. add parameter changeCount compare to official [Clipboard](https://facebook.github.io/react-native/docs/clipboard.html).

## Install

for npm >= 5.0

```sh
npm i react-native-advanced-clipboard
react-native link react-native-advanced-clipboard
```

## Method

### `getString`

same to [official getString](https://facebook.github.io/react-native/docs/clipboard.html#getstring) 

### `setString`

same to [official setString](https://facebook.github.io/react-native/docs/clipboard.html#setstring) 

### `getContent`

Get content of clipboard, include text changeCount and timestamp, this method returns a Promise, so you can use following code to get clipboard content

```javascript
import Clipboard from 'react-native-advanced-clipboard';

async _getContent() {
  const content = await Clipboard.getContent();
}
```

the return value will be like this:

```javascript
{
  text: "clipboard text",
  changeCount: 100,
  timestamp: 125868 // only support Android 8.0 and later 
}
```

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