{"id":957,"date":"2017-04-29T23:25:10","date_gmt":"2017-04-30T07:25:10","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=957"},"modified":"2017-04-29T23:25:10","modified_gmt":"2017-04-30T07:25:10","slug":"simulate-a-debounce-function","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=957","title":{"rendered":"Simulate a debounce function"},"content":{"rendered":"<p><a href=\"http:\/\/obscurejavascript.tumblr.com\/post\/115595038489\/debounce-in-javascript\">http:\/\/obscurejavascript.tumblr.com\/post\/115595038489\/debounce-in-javascript<\/a><\/p>\n<pre>\r\nvar debounce = function(callback, delay) {\r\n    var timeout = null;\r\n\r\n    return function() {\r\n        var args = arguments,\r\n            context = this;\r\n\r\n        clearTimeout(timeout);\r\n        timeout = setTimeout(function() {\r\n            callback.apply(context, args);\r\n        }, delay);\r\n    };\r\n};\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/obscurejavascript.tumblr.com\/post\/115595038489\/debounce-in-javascript var debounce = function(callback, delay) { var timeout = null; return function() { var args = arguments, context = this; clearTimeout(timeout); timeout = setTimeout(function() { callback.apply(context, args); }, delay); }; };<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-957","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=957"}],"version-history":[{"count":1,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/957\/revisions"}],"predecessor-version":[{"id":958,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/957\/revisions\/958"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=957"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}