getUniqueItemTitle

Function

Given a title, construct a site/page title that is unique if that title exists, this fn will add a number on the end, and increment until an available title is found

  • getUniqueItemTitle(title: string, options: Record<stringstring>, authMgr: IAuthenticationManager, step: number) : Promise<string>

Parameters

Parameter Type Default Notes
title Required string

site/page title to ensure if unique

options Required Record<stringstring>

an object that can be passed in to the q, eg. typekeywords, type

authMgr Required IAuthenticationManager

auth info tells the function what url to use for the "root" of the API, if missing, it will search against PROD

step Optional number 0

Number to increment. Defaults to 0

Returns

Promise<string>

Function defined in packages/common/src/items/get-unique-item-title.ts:15