nymid.js
/**
* Pair acronyms found on page with definitionList
* @param {object} uniqueNyms - array of unique acronyms
* @param {object} definitionList - JSON object of all known acronyms and definitions
* @return {object} defined - JSON object of page's acronyms and definitions
*/
Pair acronyms found on page with definitionList
Pair acronyms found on page with definitionList
function defineAcronyms(uniqueNyms, definitionList) {
  let defined = {};
  uniqueNyms.map(function(nym) {
    if (definitionList[nym]) {
      defined[nym] = definitionList[nym];
    } else {
      defined[nym] = 'No definition found';
    }
  });
  return defined;
}
function defineAcronyms ( uniqueNyms , definitionList ) { let defined = { } ; uniqueNyms . map ( function ( nym ) { if ( definitionList [ nym ] ) { defined [ nym ] = definitionList [ nym ] ; } else { defined [ nym ] = 'No definition found' ; } } ) ; return defined ; }
Pair acronyms found on page with definitionList
Pair acronyms found on page with definitionList