function specify(language, spec, index) {
  const p = parseLanguage(language);
  if (!p) return null;
  let s = 0;
  if (spec.full.toLowerCase() === p.full.toLowerCase()) {
    s |= 4;
  } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
    s |= 2;
  } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
    s |= 1;
  } else if (spec.full !== "*") {
    return null;
  }
  return {
    i: index,
    o: spec.i,
    q: spec.q,
    s,
  };
}
/**
 * Get the specificity of the language.
 */
Get the specificity of the language.
Get the specificity of the language .
function specify(language, spec, index) {
  const p = parseLanguage(language);
  if (!p) return null;
  let s = 0;
  if (spec.full.toLowerCase() === p.full.toLowerCase()) {
    s |= 4;
  } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
    s |= 2;
  } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
    s |= 1;
  } else if (spec.full !== "*") {
    return null;
  }
  return {
    i: index,
    o: spec.i,
    q: spec.q,
    s,
  };
}
function specify ( language , spec , index ) { const p = parseLanguage ( language ) ; if ( ! p ) return null ; let s = 0 ; if ( spec . full . toLowerCase ( ) === p . full . toLowerCase ( ) ) { s |= 4 ; } else if ( spec . prefix . toLowerCase ( ) === p . full . toLowerCase ( ) ) { s |= 2 ; } else if ( spec . full . toLowerCase ( ) === p . prefix . toLowerCase ( ) ) { s |= 1 ; } else if ( spec . full !== "*" ) { return null ; } return { i : index , o : spec . i , q : spec . q , s , } ; }
Get the specificity of the language.
Get the specificity of the language .