t-comm
Version:
专业、稳定、纯粹的工具库
21 lines (17 loc) • 424 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
/**
* 获取 cheerio 库
* cheerio 是一个用于在服务端解析 HTML 的第三方库
* @returns cheerio 库
* @example
* ```ts
* const cheerio = getCheerio();
* const $ = cheerio.load('<h1>hello</h1>');
* $('h1').text(); // 'hello'
* ```
*/
function getCheerio() {
return require('cheerio');
}
exports.getCheerio = getCheerio;