UNPKG

@jsxtools/eslint-plugin-jsx-a11y

Version:

Static AST checker for accessibility rules on JSX elements for flat ESLint Config.

109 lines (85 loc) 2.95 kB
import { r as requireCall, a as requireGetIteratorDirect, b as requireIsCallable, c as requireIteratorClose, d as requireIteratorStep, e as requireIteratorValue, g as requireNormalCompletion, h as requireThrowCompletion, j as getIntrinsic, k as requireType, l as requireToBoolean, m as defineProperties_1, n as implementation$3, o as callBindExports, p as getDefaultExportFromCjs } from './index-d79WKvnw.js'; var GetIntrinsic = getIntrinsic; var $TypeError = GetIntrinsic('%TypeError%'); var Call = requireCall(); var GetIteratorDirect = requireGetIteratorDirect(); var IsCallable = requireIsCallable(); var IteratorClose = requireIteratorClose(); var IteratorStep = requireIteratorStep(); var IteratorValue = requireIteratorValue(); var NormalCompletion = requireNormalCompletion(); var ThrowCompletion = requireThrowCompletion(); var ToBoolean = requireToBoolean(); var Type = 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 = defineProperties_1; var getPolyfill$1 = polyfill$1; var $IteratorPrototype = implementation$3; var shim$1 = function shimIteratorPrototypeSome() { var polyfill = getPolyfill$1(); define$1( $IteratorPrototype, { some: polyfill }, { some: function () { return $IteratorPrototype.some !== polyfill; } } ); return polyfill; }; var define = defineProperties_1; var callBind = 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__*/getDefaultExportFromCjs(Iterator_prototype_some); export { some as s };