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