rename src/common to src/utils

This commit is contained in:
zkldi
2021-05-25 17:56:41 +01:00
parent 09f5af727a
commit 7f1829daae
112 changed files with 146 additions and 146 deletions
+12
View File
@@ -0,0 +1,12 @@
import nodeFetch from "node-fetch";
const fetch =
process.env.NODE_ENV === "test"
? () => {
throw new Error("Cannot use real fetch inside testing env!");
}
: nodeFetch;
export type NodeFetch = (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
export default (fetch as unknown) as NodeFetch;