mirror of
https://github.com/JonasunderscoreJones/api.jonasjones.dev.git
synced 2025-10-23 20:19:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
17
node_modules/zod/lib/__tests__/Mocker.d.ts
generated
vendored
Normal file
17
node_modules/zod/lib/__tests__/Mocker.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
export declare class Mocker {
|
||||
pick: (...args: any[]) => any;
|
||||
get string(): string;
|
||||
get number(): number;
|
||||
get bigint(): bigint;
|
||||
get boolean(): boolean;
|
||||
get date(): Date;
|
||||
get symbol(): symbol;
|
||||
get null(): null;
|
||||
get undefined(): undefined;
|
||||
get stringOptional(): any;
|
||||
get stringNullable(): any;
|
||||
get numberOptional(): any;
|
||||
get numberNullable(): any;
|
||||
get booleanOptional(): any;
|
||||
get booleanNullable(): any;
|
||||
}
|
57
node_modules/zod/lib/__tests__/Mocker.js
generated
vendored
Normal file
57
node_modules/zod/lib/__tests__/Mocker.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Mocker = void 0;
|
||||
function getRandomInt(max) {
|
||||
return Math.floor(Math.random() * Math.floor(max));
|
||||
}
|
||||
const testSymbol = Symbol("test");
|
||||
class Mocker {
|
||||
constructor() {
|
||||
this.pick = (...args) => {
|
||||
return args[getRandomInt(args.length)];
|
||||
};
|
||||
}
|
||||
get string() {
|
||||
return Math.random().toString(36).substring(7);
|
||||
}
|
||||
get number() {
|
||||
return Math.random() * 100;
|
||||
}
|
||||
get bigint() {
|
||||
return BigInt(Math.floor(Math.random() * 10000));
|
||||
}
|
||||
get boolean() {
|
||||
return Math.random() < 0.5;
|
||||
}
|
||||
get date() {
|
||||
return new Date(Math.floor(Date.now() * Math.random()));
|
||||
}
|
||||
get symbol() {
|
||||
return testSymbol;
|
||||
}
|
||||
get null() {
|
||||
return null;
|
||||
}
|
||||
get undefined() {
|
||||
return undefined;
|
||||
}
|
||||
get stringOptional() {
|
||||
return this.pick(this.string, this.undefined);
|
||||
}
|
||||
get stringNullable() {
|
||||
return this.pick(this.string, this.null);
|
||||
}
|
||||
get numberOptional() {
|
||||
return this.pick(this.number, this.undefined);
|
||||
}
|
||||
get numberNullable() {
|
||||
return this.pick(this.number, this.null);
|
||||
}
|
||||
get booleanOptional() {
|
||||
return this.pick(this.boolean, this.undefined);
|
||||
}
|
||||
get booleanNullable() {
|
||||
return this.pick(this.boolean, this.null);
|
||||
}
|
||||
}
|
||||
exports.Mocker = Mocker;
|
Loading…
Add table
Add a link
Reference in a new issue