mirror of
https://github.com/Azure/setup-helm.git
synced 2025-09-19 18:36:30 +00:00
Add node modules and new code for release (#57)
Co-authored-by: taakleton <taakleton@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
da63a48ad7
commit
a517f2ff65
27
node_modules/@sinonjs/commons/lib/every.js
generated
vendored
Normal file
27
node_modules/@sinonjs/commons/lib/every.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Returns true when fn returns true for all members of obj.
|
||||
* This is an every implementation that works for all iterables
|
||||
*
|
||||
* @param {object} obj
|
||||
* @param {Function} fn
|
||||
* @returns {boolean}
|
||||
*/
|
||||
module.exports = function every(obj, fn) {
|
||||
var pass = true;
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
|
||||
obj.forEach(function() {
|
||||
if (!fn.apply(this, arguments)) {
|
||||
// Throwing an error is the only way to break `forEach`
|
||||
throw new Error();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
pass = false;
|
||||
}
|
||||
|
||||
return pass;
|
||||
};
|
Reference in New Issue
Block a user