npm.io
1.0.1 • Published 11 years ago

onresize

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
3

onresize

An optimized window.resize function

var onresize = require('onresize');
// start process
var {dispose} = onresize.on(function() {
    console.log('Resource conscious resize callback!')
});

// once done
dispose();

Also:

  • comes with TypeScript definitions built in
  • returns an object that has a dispose function to unhook the handler

To learn more on why you would want to use this checkout this article.

Keywords