function populateArtboard(layer, data, opt) {
  // get original text
  let originalText = getOriginalText(layer)

  // set original text
  setOriginalText(layer, originalText)

  // extract placeholders from original artboard name
  let placeholders = Core.placeholders.extractPlaceholders(originalText)

  // create populated string, starting with the original text and gradually replacing placeholders
  let populatedString = originalText
  placeholders.forEach(placeholder => {
    // populate placeholder found in the original text
    let populatedPlaceholder = Core.placeholders.populatePlaceholder(
      placeholder,
      data,
      opt.defaultSubstitute
    )

    // replace original placeholder string (e.g. {firstName}) with populated placeholder string
    populatedString = populatedString.replace(placeholder.string, populatedPlaceholder)
  })

  // set artboard name
  layer.setName(populatedString)
}
Populates an artboard name.

@param {MSArtboard} layer
@param {Object} data
@param {Object} opt

opt: {
  defaultSubstitute {String}
}