@jsxtools/eslint-plugin-jsx-a11y
Version:
Static AST checker for accessibility rules on JSX elements for flat ESLint Config.
109 lines (85 loc) • 2.68 kB
JavaScript
const index = require('./index-BnNhLopb.cjs');
var GetIntrinsic = index.getIntrinsic;
var $TypeError = GetIntrinsic('%TypeError%');
var Call = index.requireCall();
var GetIteratorDirect = index.requireGetIteratorDirect();
var IsCallable = index.requireIsCallable();
var IteratorClose = index.requireIteratorClose();
var IteratorStep = index.requireIteratorStep();
var IteratorValue = index.requireIteratorValue();
var NormalCompletion = index.requireNormalCompletion();
var ThrowCompletion = index.requireThrowCompletion();
var ToBoolean = index.requireToBoolean();
var Type = index.requireType();
var implementation$2 = function some(predicate) {
if (this instanceof some) {
throw new $TypeError('`some` is not a constructor');
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(predicate)) {
throw new $TypeError('`predicate` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var counter = 0; // step 5
// eslint-disable-next-line no-constant-condition
while (true) { // step 6
var next = IteratorStep(iterated); // step 6.a
if (!next) {
return false; // step 6.b
}
var value = IteratorValue(next); // step 6.c
var result;
try {
result = Call(predicate, void undefined, [value, counter]); // step 6.d
} catch (e) {
// close iterator // step 6.e
IteratorClose(
iterated,
ThrowCompletion(e)
);
} finally {
counter += 1; // step 6.g
}
if (ToBoolean(result)) {
return IteratorClose(
iterated,
NormalCompletion(true)
); // step 6.f
}
}
};
var implementation$1 = implementation$2;
var polyfill$1 = function getPolyfill() {
return typeof Iterator === 'function' && typeof Iterator.prototype.some === 'function'
? Iterator.prototype.some
: implementation$1;
};
var define$1 = index.defineProperties_1;
var getPolyfill$1 = polyfill$1;
var $IteratorPrototype = index.implementation;
var shim$1 = function shimIteratorPrototypeSome() {
var polyfill = getPolyfill$1();
define$1(
$IteratorPrototype,
{ some: polyfill },
{ some: function () { return $IteratorPrototype.some !== polyfill; } }
);
return polyfill;
};
var define = index.defineProperties_1;
var callBind = index.callBindExports;
var implementation = implementation$2;
var getPolyfill = polyfill$1;
var shim = shim$1;
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
var Iterator_prototype_some = polyfill;
const some = /*@__PURE__*/index.getDefaultExportFromCjs(Iterator_prototype_some);
exports.some = some;