We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db7a8ac commit e7c349dCopy full SHA for e7c349d
src/siblings.js
@@ -1,11 +1,13 @@
1
import children from "./children.js";
2
-import $not from "./not.js";
+import { filter } from "fxjs/es";
3
+import $is from "./is.js";
4
5
export default function siblings(sel, el) {
6
if (arguments.length == 1) {
7
if (typeof sel == "string") return (el) => siblings(sel, el);
8
el = sel;
9
sel = "*";
10
}
- return $not((_el) => el === _el, children(el.parentNode));
11
+
12
+ return filter((_el) => el !== _el && $is(sel, _el), children(el.parentNode));
13
0 commit comments