A package that helps you generate referral code for your users.
$ npm install referral-code-generator
* Little and easy to use.
* Generate random and custom referral code.
import referralCodeGenerator from 'referral-code-generator'
OR
let referralCodeGenerator = require('referral-code-generator')
example 1:
referralCodeGenerator.alpha('lowercase', 12)
result: the above code will return 12 random alphabets in lowercase.
example 2:
referralCodeGenerator.alphaNumeric('uppercase', 8, 7)
result: the above code will return 8 alphabets and 7 numbers respectively.
example 3:
referralCodeGenerator.custom('lowercase', 6, 6, 'temitope');
result: the above code will return 6 letters from the supplied username and 6 random numbers.
username: This is your user's unique name.
wordlength: The number of alphabets you want to extract from the username to form the referral code.
numberlength: The number of random digits you want to generate.
type: The word case format you want. [uppercase, lowercase].