function findPageWithName(name, fullMatch) {
  let doc = MSDocument.currentDocument()
  let pages = Utils.convertToJSArray(doc.pages())
  for (let i = 0; i < pages.length; i++) {
    let currentPage = pages[i]

    // if page matches name
    if (fullMatch) {
      if (currentPage.name() === name) {
        return currentPage
      }
    } else {
      if (currentPage.name().indexOf(name) > -1) {
        return currentPage
      }
    }
  }
}
Finds a page with the specified name in the current document.

@param {String} name
@param {Boolean} fullMatch
@returns {MSPage}