orazdow / SAR

0 stars 1 forks source link

Update the fetch script to omit the `attributes` key when none are present #2

Closed marques-work closed 4 years ago

marques-work commented 4 years ago

This better fits the interface in react-d3-tree as outlined here:

  type ReactD3TreeItem = {
    name?: string,
    attributes?: {
      [key: string]: string,
    };
    children?: ReactD3TreeItem[],
    _collapsed?: boolean,
    nodeSvgShape?: NodeSvgShape
  };

From (https://github.com/bkrem/react-d3-tree/blob/365001ec214f9741716a7612991e145ac1163584/react-d3-tree.d.ts#L7-L15)

Additionally, this PR also changes the line endings of fetch.js to be unix line endings (i.e., only \n).