UNPKG

unique-selector

Version:

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

10 lines (9 loc) 183 B
/** * Returns the Tag of the element * @param { Object } element * @return { String } */ export function getTag( el ) { return el.tagName.toLowerCase().replace(/:/g, '\\:'); }