# mq-match-maker

> A small wrapper for the matchMedia browser API when working with media queries in JavaScript

Latest version **1.0.3** (published 2018-08-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install mq-match-maker
pnpm add mq-match-maker
yarn add mq-match-maker
bun add mq-match-maker
```

## 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.3 |
| Published | 2018-08-24 |
| First published | 2018-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 206.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Patrick Johnson |
| Maintainers | patrickbjohnson |

## Links

- npm: https://www.npmjs.com/package/mq-match-maker
- Repository: https://github.com/patrickbjohnson/matchMaker
- Homepage: https://github.com/patrickbjohnson/matchMaker#readme
- Issues: https://github.com/patrickbjohnson/matchMaker/issues
- npm.io page: https://npm.io/package/mq-match-maker

## Recent versions

- 1.0.3 (latest) — 2018-08-24
- 1.0.2 — 2018-05-21
- 1.0.1 — 2018-05-21
- 1.0.0 — 2018-05-21

## README

# MQ Match Maker
A really small library to make working with `matchMedia` a little easier. 

## Installation

Using npm:
```
npm i --save mq-match-maker
```

## Usage
```
const foo = (matches) => {
    console.log(matches ? 'foo' : 'bar' )
}

matchMaker.register('(min-width: 600px)', foo)

matchMaker.deregister('(min-width: 600px)', foo)
```

### Prevent callback from firing on initial load
```
const foo = (matches) => {
    console.log(matches ? 'foo' : 'bar' )
}

matchMaker.register('(min-width: 600px)', foo, false)
```

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