Socket
Socket
Sign inDemoInstall

mq-match-maker

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mq-match-maker

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


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
208 kB
Created
Weekly downloads
 

Readme

Source

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)

FAQs

Last updated on 24 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc