New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

responsive

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive

Simple window size checkpoints

latest
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

responsive

Simple window size checkpoints in the browser.

Install

npm i -S responsive

Usage

import responsive from 'responsive'

const opts = {
  checkpoints: {
    small: {
      width: [0, 400]
    },
    big: {
      width: [401, null]
    }
  }
}
responsive(opts, data => {
  // This callback fires immediately and whenever the window size changes
  console.log(data)
  // {
  //   width: 824,
  //   height: 977,
  //   square: false,
  //   portrait: true,
  //   landscape: false,
  //   matches: ['big']
  // }
})

FAQs

Package last updated on 25 Mar 2018

Did you know?

Socket

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