addNodeIcon = (node, icon) => {

  if (!icon) {
    return;
  }

  // Font Awesome style

  if (icon.fa) {

    node.shape = 'icon';
    node.icon = {
      shape: 'icon',
      face: 'FontAwesome',
      color: node.color,
      code: String.fromCharCode('0x' + getFAdigits(icon.fa)),
    };

    if (node.size) {
      node.icon.size = node.size;
    }

    return;
  }

  // TiddlyWiki stored icons

  if (icon.tw) {

    const imgTObj = utils.getTiddler(icon.tw);

    if (!imgTObj) {
      return;
    }

    if (imgTObj.fields['_canonical_uri']) { // image is a url address

      node.image = imgTObj.fields['_canonical_uri'];
      node.shape = 'image';

    } else if (imgTObj.fields.text) {

      node.image = utils.getDataUri(imgTObj);
      node.shape = 'image';
    }
  }

}
Adds an icon to the specified node.

@param {Node} node
@param {Object} icon