static cloneOptions(item, type) {
    const clonedOptions = {};
    if (type === undefined || type === "node") {
      deepExtend(clonedOptions, item.options, true);
      clonedOptions.x = item.x;
      clonedOptions.y = item.y;
      clonedOptions.amountOfConnections = item.edges.length;
    } else {
      deepExtend(clonedOptions, item.options, true);
    }
    return clonedOptions;
  }
This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.
@param {vis.Item} item
@param {'node'|undefined} type
@returns {{}}
@static