onresize
v1.0.1
Published
Resource concious window.resize
Downloads
73
Maintainers
Readme
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.