UNPKG

unique-selector

Version:

Given a DOM node, return a unique CSS selector matching only that element

14 lines (13 loc) 278 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTag = getTag; /** * Returns the Tag of the element * @param { Object } element * @return { String } */ function getTag(el) { return el.tagName.toLowerCase().replace(/:/g, '\\:'); }