Skip to content

Instantly share code, notes, and snippets.

@arturi
Created October 27, 2016 23:12
Show Gist options
  • Save arturi/693d0ef499bc3bab7ae4482cfeac6b15 to your computer and use it in GitHub Desktop.
Save arturi/693d0ef499bc3bab7ae4482cfeac6b15 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
</body>
</html>
import throttle from 'throttle-debounce/throttle'
function log () {
console.log('bla!')
}
setInterval(() => {
console.log('123')
throttle(1000, () => log())
}, 10)
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"throttle-debounce": "1.0.1"
}
}
'use strict';
var _throttle = require('throttle-debounce/throttle');
var _throttle2 = _interopRequireDefault(_throttle);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function log() {
console.log('bla!');
}
setInterval(function () {
console.log('123');
(0, _throttle2.default)(1000, function () {
return log();
});
}, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment