updateFormatMenu = (applicationMenu, formats) => {
  const formatMenuItem = applicationMenu.getMenuItemById('formatMenuItem')
  formatMenuItem.submenu.items.forEach(item => (item.checked = false))
  formatMenuItem.submenu.items
    .forEach(item => {
      if (item.id && formats[MENU_ID_FORMAT_MAP[item.id]]) {
        item.checked = true
      }
    })
}
Update format menu entires from given state.

@param {Electron.MenuItem} applicationMenu The application menu instance.
@param {Object.<string, boolean>} formats A object map with selected formats.