1.0.8 • Published 4 years ago

referral-code-generator v1.0.8

Weekly downloads
237
License
MIT
Repository
github
Last release
4 years ago

Referral Code Generator

npm (scoped) npm (scoped)

A package that helps you generate referral code for your users.

Installation

$ npm install referral-code-generator

Features

* Little and easy to use.
* Generate random and custom referral code.

Usage

import referralCodeGenerator from 'referral-code-generator'

OR

let referralCodeGenerator = require('referral-code-generator')

Generating your referral code

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.

Parameters

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].
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.2

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago