typia
Version:
Superfast runtime validators with only one line
16 lines (15 loc) • 596 B
JavaScript
import { _randomString } from "./_randomString.mjs";
import { _randomSegmentLength } from "./_randomStringLength.mjs";
//#region src/internal/_randomFormatEmail.ts
const _randomFormatEmail = (props) => {
if (props?.minLength === void 0 && props?.maxLength === void 0) return `${random(10)}@${random(10)}.${random(3)}`;
return `${_randomSegmentLength(props, 4, 10, 1)}@${random(1)}.${random(1)}`;
};
const random = (length) => _randomString({
type: "string",
minLength: length,
maxLength: length
});
//#endregion
export { _randomFormatEmail };
//# sourceMappingURL=_randomFormatEmail.mjs.map