/**
 * 判断是否是外部链接
 *
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path: string) {
  const isExternal = /^(https?:|http?:|mailto:|tel:)/.test(path)
  return isExternal
}

export function sleep(t = 1000) {
  return new Promise((resolve) => {
    setTimeout(() => {
      return resolve(true)
    }, t)
  })
}
