Files
yenai-plugin/model/api/funApi/utils.js
2024-04-03 20:43:35 +08:00

16 lines
392 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export const API_ERROR = '出了点小问题,待会再试试吧'
let cheerio = null
/**
*
*/
export async function _importDependency () {
if (cheerio) return cheerio
cheerio = await import('cheerio')
.catch(() => {
throw Error('未检测到依赖cheerio请安装后再使用该功能安装命令pnpm add cheerio -w 或 pnpm install -P')
})
return cheerio
}