code: function basicCreate(layerName, context) {
    if (typeof context === 'undefined')
      context = cop.GlobalNamedLayers;
    if (typeof context[layerName] !== 'undefined') {
      let existing = context[layerName];
      if (!existing.isLayer /* undefined or falsy */ || !existing.isLayer()) {
        throw new Error('Will not overwrite existing property ' + layerName);
      }
      return existing;
    } else {
      return context[layerName] = new cop.Layer(layerName, context);
    }
  }
docs: Private helpers