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

detect-resize

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-resize

Detect element resize in universal applications.

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

detect-resize

Slightly refactored version of https://github.com/sdecima/javascript-detect-element-resize targeting universal React applications. Will not throw if imported (ES6) on the server.

Build Status

NPM

Install

npm i -S detect-resize

How to use

Should work the same as javascript-detect-element-resize without throwing errors if used in a server environment.

import { addResizeListener, removeResizeListener } from 'detect-resize'

const resizeElement = document.getElementById('resizeElement'),
const handleResize = () => { console.info('resized') }

addResizeListener(resizeElement, handleResize)
removeResizeListener(resizeElement, handleResize)

Keywords

sync

FAQs

Package last updated on 08 Jun 2016

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