couponjs
Version:
Generate coupons.
37 lines (33 loc) • 906 B
text/typescript
type FormatRuleObjectType = {
separators: string[];
groups: number[];
};
type CharacterSetOptionsType = {
builtIn?: string[];
custom?: string[];
};
type OmitCharactersType = string[];
type CouponEngineOptionType = {
verbose?: boolean;
logPerformance?: boolean;
maxNumberOfCouponsToGenerate?: number;
};
type CouponGenerationOptionType = {
length?: number;
prefix?: string;
suffix?: string;
characterSet?: CharacterSetOptionsType;
numberOfCoupons?: number;
omitCharacters?: OmitCharactersType;
format?: string | FormatRuleObjectType;
};
declare class CouponJS {
private config;
private performance;
private maxNumberOfCouponsToGenerate;
private logPerformance;
private verbose;
constructor(config?: CouponEngineOptionType);
generate(option?: CouponGenerationOptionType): any;
}
export { CouponJS, CouponJS as default };