mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-24 21:50:00 +08:00
Add node modules and new code for release (#168)
Co-authored-by: OliverMKing <OliverMKing@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ca8d2604ac
commit
a0f00e5017
+14
@@ -0,0 +1,14 @@
|
||||
// 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;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = before;
|
||||
Reference in New Issue
Block a user