Add this tiny plugin by Ben Alman to Drupal core to handle efficiently events (scroll and resize specially), and it can be useful in other cases: not letting hitting submit button more than x times per second, etc.
It's double-licensed GPL-MIT, so no problems there.

My reasoning is explained in this blog post, where I've visualized and tested different implementations: (Alman's jQuery plugin, underscore.js and lodash.js)

There has been some thoughts already before of adding similar functionality (some comments of _nod and Kiphaas7 and jessebeach)

If underscore.js gets into Core #1149866: Add Backbone.js and Underscore.js to core then we could remove Ben's plugin, both implementations are equivalent.


seutje’s picture

Status: Needs review » Closed (duplicate)

since #1149866: Add Backbone.js and Underscore.js to core went in, I'ma mark this as duplicate.