message: Here, have some sockets exported to your spreadsheet.
diff: import * as _ from 'underscore';
  -import { DimItem } from './item-types';
  +import { DimItem, DimSockets } from './item-types';
  import { t } from 'i18next';
  // step node names we'll hide, we'll leave "* Chroma" for now though, since we don't otherwise indicate Chroma
  @@ -38,6 +38,19 @@ function downloadCsv(filename, csv) {
  document.body.removeChild(pom);
  }
  +function buildSocketString(sockets: DimSockets): string {
  + const socketItems = sockets.sockets.map((s) =>
  + s.plugOptions.map(
  + (p) =>
  + s.plug && s.plug.plugItem.hash && p.plugItem.hash === s.plug.plugItem.hash
  + ? `${p.plugItem.displayProperties.name}*`
  + : p.plugItem.displayProperties.name
  + )
  + );
  +
  + return socketItems.join(',');
  +}
  +
  function buildNodeString(nodes) {
  let data = '';
  nodes.forEach((node) => {
  @@ -103,9 +116,13 @@ function downloadArmor(items, nameMap) {
  data += cleanNotes(item);
  + console.log(item);
  +
  // if DB is out of date this can be null, can't hurt to be careful
  if (item.talentGrid) {
  data += buildNodeString(item.talentGrid.nodes);
  + } else if (item.sockets) {
  + data += buildSocketString(item.sockets);
  }
  data += '\n';
  });
  @@ -189,9 +206,13 @@ function downloadWeapons(guns, nameMap) {
  data += cleanNotes(gun);
  + console.log(gun);
  +
  // haven't seen this null yet, but can't hurt to check since we saw it on armor above
  if (gun.talentGrid) {
  data += buildNodeString(gun.talentGrid.nodes);
  + } else if (gun.sockets) {
  + data += buildSocketString(gun.sockets);
  }
  data += '\n';
  });
  