A simple throttling function to interrupt excessive function calls. Works with requirejs and nodejs with no external dependencies.