# blurify

> Image blurify.

Latest version **1.2.1** (published 2020-09-18) · MIT license · 0 weekly downloads

## Install

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

## 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.2.1 |
| Published | 2020-09-18 |
| First published | 2017-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 693 |
| Author | 大板栗 |
| Maintainers | justclear |
| Keywords | blurify, library |

## Links

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

## Recent versions

- 1.2.1 (latest) — 2020-09-18
- 1.2.0 — 2019-01-10
- 1.1.0 — 2017-06-29
- 1.0.8 — 2017-03-25
- 1.0.7 — 2017-03-08
- 1.0.6 — 2017-03-08
- 1.0.5 — 2017-03-07
- 1.0.4 — 2017-03-06
- 1.0.3 — 2017-03-03
- 1.0.2 — 2017-03-03
- 1.0.1 — 2017-03-03
- 1.0.0 — 2017-03-01

## README

# blurify

![travis](https://api.travis-ci.org/JustClear/blurify.svg?branch=master)
[![dependencies](https://david-dm.org/justclear/blurify.svg)](https://david-dm.org/justclear/blurify#info=dependencies&view=table)
[![devDependencies](https://david-dm.org/justclear/blurify/dev-status.svg)](https://david-dm.org/justclear/blurify#info=devDependencies&view=table)

blurify.js is a tiny(~2kb) library to blur pictures, with graceful downgrade support from `css` mode to `canvas` mode.

## Installation

```sh
$ npm i blurify
```

## DEMO

[Demo](https://justclear.github.io/blurify/)

## Usage

### blurify(options)

blurify the images with given `options`:

- `images` { Element }, blurify target elements.
- `blur` { Int }, extent of blur, defaulting to `6`.
- `mode` { String }, mode of blurify.
    - `css`: use `filter` property.(`default`)
    - `canvas`: use `canvas` export base64.
    - `auto`: use `css` mode firstly, otherwise switch to `canvas` mode by automatically.

```js
import blurify from 'blurify';

new blurify({
    images: document.querySelectorAll('.blurify'),
    blur: 6,
    mode: 'css',
});

// or in shorthand

blurify(6, document.querySelectorAll('.blurify'));
```

### License

Licensed under the [MIT License](https://github.com/JustClear/blurify/blob/master/LICENSE)

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