onresize
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i onresize

Weekly Downloads

32

Version

1.0.1

License

MIT

Last publish

Collaborators

  • basarat