Added the underscore node_module.
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 39s
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 39s
This commit is contained in:
18
node_modules/underscore/amd/before.js
generated
vendored
Normal file
18
node_modules/underscore/amd/before.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
define(function () {
|
||||
|
||||
// Returns a function that will only be executed up to (but not including) the
|
||||
// Nth call.
|
||||
function before(times, func) {
|
||||
var memo;
|
||||
return function() {
|
||||
if (--times > 0) {
|
||||
memo = func.apply(this, arguments);
|
||||
}
|
||||
if (times <= 1) func = null;
|
||||
return memo;
|
||||
};
|
||||
}
|
||||
|
||||
return before;
|
||||
|
||||
});
|
Reference in New Issue
Block a user