import capitalize from 'microsoft-capitalize'

const special = [
  'AI',
  'ApiFlash',
  'apiKey',
  'APIs',
  'background',
  'browser',
  'cache',
  'click',
  'CodeSandbox',
  'cURL',
  'deviceScaleFactor',
  'Edge Node Cache',
  'fullPage',
  'GA',
  'GitHub',
  'GPU',
  'hasTouch',
  'height',
  'HTML',
  'isLandscape',
  'isMobile',
  'JavaScript',
  'Lighthouse Viewer',
  'Lighthouse',
  'Mesa',
  'Microlink Cards',
  'Microlink',
  'oEmbed',
  'omitBackground',
  'Open Graph',
  'options',
  'PDFs',
  'quality',
  'retry',
  'ScreenshotAPI',
  'Screenshotmachine',
  'ScreenshotOne',
  'scroll',
  'SDK',
  'SEO',
  'staleTtl',
  'timeout',
  'type',
  'TypeScript',
  'Unified Cache',
  'url',
  'URL2PNG',
  'URLs',
  'waitFor',
  'waitUntil',
  'WebGL',
  'width',
  'WordPress'
]

export const title = (str, exceptions = []) =>
  capitalize(str, special.concat(exceptions))
