# pastejs

> paste image to DOM

Latest version **1.0.6** (published 2016-08-12) · MIT license · 0 weekly downloads

## Install

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

## 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.0.6 |
| Published | 2016-08-12 |
| First published | 2016-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jayzou |
| Maintainers | jayzou |
| Keywords | paste, picture, image |

## Links

- npm: https://www.npmjs.com/package/pastejs
- Repository: https://github.com/jayZOU/pastejs
- Issues: https://github.com/jayZOU/pastejs/issues
- npm.io page: https://npm.io/package/pastejs

## Dependencies (2)

- [webpack](https://npm.io/package/webpack.md) ^1.12.4
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) ^1.12.1

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2016-08-12
- 1.0.5 — 2016-08-12
- 1.0.4 — 2016-08-12
- 1.0.3 — 2016-08-12
- 1.0.2 — 2016-08-12

## README

# pastejs


> 从剪切板中粘贴图片到DOM上，仅支持chrome浏览器

[demo][1]

---
## install

    npm install pastejs
    
---
## usage
    
    const Pastejs = require('Pastejs');
    const pastejs = new Pastejs({
            isDebug: true,
            target : box,                                   //剪切区域(ID)
            callBack: function(paste){                      //回调，返回blob和剪切图片属性
                console.log(paste);
                document.getElementById("img").src = paste['source'];
                document.getElementById("text").innerHTML = "size:" + paste['blob'].size + "<br>type:" + paste['blob'].type;
            }
        });
---
## License
MIT


  [1]: http://jayzou.github.io/pastejs/index.html

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