Skip to content

Instantly share code, notes, and snippets.

// Originally inspired by David Walsh (https://davidwalsh.name/javascript-debounce-function)
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// `wait` milliseconds.
const debounce = (func, wait) => {
let timeout;
return function executedFunction(...args) {
const later = () => {
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-cssbeautifier');
grunt.loadNpmTasks('grunt-strip-css-comments');
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
// Define paths.
paths: {
sass: 'source/sass',
devCSS: 'css',