aria-hidden
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -16,3 +16,4 @@ var getDefaultParent = function (originalTarget) { | ||
var correctTargets = function (parent, targets) { | ||
return targets.map(function (target) { | ||
return targets | ||
.map(function (target) { | ||
if (parent.contains(target)) { | ||
@@ -27,3 +28,4 @@ return target; | ||
return null; | ||
}).filter(function (x) { return Boolean(x); }); | ||
}) | ||
.filter(function (x) { return Boolean(x); }); | ||
}; | ||
@@ -30,0 +32,0 @@ /** |
@@ -13,3 +13,4 @@ const getDefaultParent = (originalTarget) => { | ||
const unwrapHost = (node) => node && (node.host || unwrapHost(node.parentNode)); | ||
const correctTargets = (parent, targets) => targets.map(target => { | ||
const correctTargets = (parent, targets) => targets | ||
.map((target) => { | ||
if (parent.contains(target)) { | ||
@@ -24,3 +25,4 @@ return target; | ||
return null; | ||
}).filter((x) => Boolean(x)); | ||
}) | ||
.filter((x) => Boolean(x)); | ||
/** | ||
@@ -27,0 +29,0 @@ * Marks everything except given node(or nodes) as aria-hidden |
@@ -19,3 +19,4 @@ "use strict"; | ||
var correctTargets = function (parent, targets) { | ||
return targets.map(function (target) { | ||
return targets | ||
.map(function (target) { | ||
if (parent.contains(target)) { | ||
@@ -30,3 +31,4 @@ return target; | ||
return null; | ||
}).filter(function (x) { return Boolean(x); }); | ||
}) | ||
.filter(function (x) { return Boolean(x); }); | ||
}; | ||
@@ -33,0 +35,0 @@ /** |
{ | ||
"name": "aria-hidden", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Cast aria-hidden to everything, except...", | ||
@@ -16,3 +16,2 @@ "main": "dist/es5/index.js", | ||
"format": "lib-builder format", | ||
"analyze": "ts-react-toolbox analyze", | ||
"size": "npx size-limit", | ||
@@ -56,11 +55,2 @@ "size:report": "npx size-limit --json > .size.json", | ||
"module:es2019": "dist/es2019/index.js", | ||
"peerDependencies": { | ||
"react": "^16.9.0 || ^17.0.0 || ^18.0.0", | ||
"@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@types/react": { | ||
"optional": true | ||
} | ||
}, | ||
"lint-staged": { | ||
@@ -67,0 +57,0 @@ "*.{ts,tsx}": [ |
1
566
29954