0.2.1 • Published 9 years ago

winresize-event v0.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

winresize-event

Debounced window resize suitable for desktop and mobile browsers.

Install

npm install --save winresize-event

Usage

var wr = require('winresize-event');

wr.winResize.on(function(winDimensions) {
  console.log(winDimensions);
});

For sychronous use:

console.log(wr.getWinSize());

winResize also has .once and .removeListener methods.