Skip to content

Slugmaster generates slugs and Coupon codes in a flash, npm i slugmaster

Notifications You must be signed in to change notification settings

lifeofsoumya/slugmaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coupon Code and Slug Generator

A simple TypeScript package for generating unique coupon codes and random slugs. This package provides two main functionalities: generating coupon codes with various options and creating random slugs from a predefined list of words.

Installation

To install the package, run:

npm install slugmaster

USE

import { generateCouponCode } from 'slugmaster';
const couponCode = generateCouponCode({
  length: 10,
  prefix: 'SAVE',
  type: 'alphanumeric',
  includeLowercase: true,
  includeSymbols: false
});
import { generateSlug } from 'slugmaster';
const slug = generateSlug({
  wordCount: 3
});

Options

For Coupon Code

  • length: Length of the coupon code (default: 6)
  • type: Character types (alpha, alphanumeric, numeric)
  • prefix: Prefix for the coupon code (default: 'CP')
  • includeLowercase: Include lowercase letters (default: false)
  • includeSymbols: Include special characters (default: false)

For Slug Generation

  • wordCount: Number of words in the slug (default: 3)
  • randomStringLength: Length of the random string to append (default: 0)

About

Slugmaster generates slugs and Coupon codes in a flash, npm i slugmaster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published