delay-component
v1.0.1
Published
delay the given fn
Downloads
5
Readme
delay
delay the given fn
.
Installation
$ npm install delay-component
Example
var el = document.querySelector('#search');
var delay = require('delay');
el.onkeyup = delay(200, function(e){
var val = e.target.value;
// do ajax search or something.
});
License
MIT