UNPKG

webextension-store-meta

Version:

Get browser extension(webextension) item meta from Chrome Web Store and Firefox add-ons.

18 lines 561 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchText = void 0; const undici_1 = require("undici"); const DEFAULT_OPTIONS = { headers: { "User-Agent": "Mozilla/5.0", }, }; const fetchText = async (url, options = DEFAULT_OPTIONS) => { const response = await (0, undici_1.fetch)(url, options); if (!response.ok) { throw new Error(`${response.status} ${response.statusText}: ${url}`); } return response.text(); }; exports.fetchText = fetchText; //# sourceMappingURL=fetch-text.js.map