1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.isUnique = isUnique;
|
7 | /**
|
8 | * Checks if the selector is unique
|
9 | * @param { Object } element
|
10 | * @param { String } selector
|
11 | * @return { Array }
|
12 | */
|
13 | function isUnique(el, selector) {
|
14 | if (!Boolean(selector)) return false;
|
15 | var elems = el.ownerDocument.querySelectorAll(selector);
|
16 | return elems.length === 1 && elems[0] === el;
|
17 | } |
\ | No newline at end of file |