UNPKG

http-request-mock

Version:

Intercept & mock http requests issued by XMLHttpRequest, fetch, nodejs https/http module, axios, jquery, superagent, ky, node-fetch, request, got or any other request libraries by intercepting XMLHttpRequest, fetch and nodejs native requests in low level.

17 lines (16 loc) 444 B
/** * Convert type of js file. * @param {string} type cjs or esm * @param {string[] | Record<string, string>} files */ export function convertJsType(type: string, files: string[] | Record<string, string>): void; /** * Convert es6 to commonjs * @param {string} codes */ export function covertES62CJS(codes: string): string; /** * Convert commonjs to es6 * @param {string} codes */ export function covertCJS2ES6(codes: string): string;