packages/pcb-stackup/index.js
function makeBaseStackupLayer(layer) {
    var layerSide = layer.side
    var layerType = layer.type

    if (
      layer.filename &&
      typeof layerSide === 'undefined' &&
      typeof layerType === 'undefined'
    ) {
      var gerberId = layerTypes[layer.filename]
      layerSide = gerberId.side
      layerType = gerberId.type
    }

    var layerOptions = extend(layer.options)

    if (layerOptions.plotAsOutline == null && layerType === wtg.TYPE_OUTLINE) {
      layerOptions.plotAsOutline = true
    }

    if (
      options &&
      options.outlineGapFill != null &&
      layerOptions.plotAsOutline
    ) {
      layerOptions.plotAsOutline = options.outlineGapFill
    }

    return extend(layer, {
      side: layerSide,
      type: layerType,
      options: layerOptions,
    })
  }
function makeBaseStackupLayer(layer) {
    var layerSide = layer.side
    var layerType = layer.type

    if (
      layer.filename &&
      typeof layerSide === 'undefined' &&
      typeof layerType === 'undefined'
    ) {
      var gerberId = layerTypes[layer.filename]
      layerSide = gerberId.side
      layerType = gerberId.type
    }

    var layerOptions = extend(layer.options)

    if (layerOptions.plotAsOutline == null && layerType === wtg.TYPE_OUTLINE) {
      layerOptions.plotAsOutline = true
    }

    if (
      options &&
      options.outlineGapFill != null &&
      layerOptions.plotAsOutline
    ) {
      layerOptions.plotAsOutline = options.outlineGapFill
    }

    return extend(layer, {
      side: layerSide,
      type: layerType,
      options: layerOptions,
    })
  }
function makeBaseStackupLayer ( layer ) { var layerSide = layer . side var layerType = layer . type if ( layer . filename && typeof layerSide === 'undefined' && typeof layerType === 'undefined' ) { var gerberId = layerTypes [ layer . filename ] layerSide = gerberId . side layerType = gerberId . type } var layerOptions = extend ( layer . options ) if ( layerOptions . plotAsOutline == null && layerType === wtg . TYPE_OUTLINE ) { layerOptions . plotAsOutline = true } if ( options && options . outlineGapFill != null && layerOptions . plotAsOutline ) { layerOptions . plotAsOutline = options . outlineGapFill } return extend ( layer , { side : layerSide , type : layerType , options : layerOptions , } ) }
extend pcb-stackup input layer with necessary details for pcb-stackup-core
extend pcb - stackup input layer with necessary details for pcb - stackup - core