export const getUniqueScore = ( querySelector , target ) : Number => { try { const totalNodes = target . querySelectorAll ( querySelector ) . length ; return Number ( ( 1 / totalNodes ) . toPrecision ( ) ) ; } catch ( err ) { return 0 ; } } ; export const getQuerySelector = ( nodeName , attributeName , attributeValue ) : string => { return `${ nodeName . toLowerCase ( ) }[${ attributeName }="${ attributeValue }"]` ; } ;