mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
33 lines
662 B
TypeScript
33 lines
662 B
TypeScript
const nullStub = (): any => null;
|
|
|
|
export const createRequest = (options: any) => ({
|
|
app: {},
|
|
baseUrl: "",
|
|
body: {},
|
|
cookies: {},
|
|
fresh: true,
|
|
headers: {},
|
|
hostname: "example.com",
|
|
ip: "",
|
|
ips: [],
|
|
method: "GET",
|
|
originalUrl: "/",
|
|
params: {},
|
|
path: "/",
|
|
protocol: "https",
|
|
query: {},
|
|
route: {},
|
|
secure: true,
|
|
signedCookies: {},
|
|
stale: false,
|
|
subdomains: [],
|
|
xhr: true,
|
|
accepts: nullStub(),
|
|
acceptsCharsets: nullStub(),
|
|
acceptsEncodings: nullStub(),
|
|
acceptsLanguages: nullStub(),
|
|
get: nullStub(),
|
|
is: nullStub(),
|
|
range: nullStub(),
|
|
...options
|
|
});
|