Simcy Creative
  • What is Simcify
  • Requirements
  • Getting Started
  • Javascript Functions
    • Simple js Functions
    • Interaction Functions
      • Loader
      • Notifications
      • Credit Card Form
    • Helper Functions
      • Random
      • Cookies
      • Send to server(Ajax)
      • Server Responses
    • HTML helpers
      • Form Processing
      • Send onClick
      • Send onChange
      • Fetch & Display
      • Dropify
      • Switchery
      • Crop Image Input
      • Image Preview
  • PHP Functions
    • Introduction
    • Setup
    • Authentication
      • Login
      • Register
      • Forgot Password
      • Reset Password
    • Configuration
    • Email & SMS
      • SMS
        • Africa's Talking
        • Twilio
      • Email
    • Files Manager
      • Upload
      • Delete
Powered by GitBook
On this page
  1. Javascript Functions
  2. Helper Functions

Random

Function that returns a random and unique string and can be customised.

How to use:

/*
 * without options
 */
random();

/*
 * without options
 */
random(options)

{
    length: 16,            // length
    type: "alphabel",      // "aphabet" or "numbers"
    case :"upper"          // "lower" or "upper"
}

Options

option

Required

Type

Default

Description

length

No

integer

16

length of the returned string.

type

No

string

random

"aphabet" or "numbers"

case

No

string

random

"lower" or "upper"

/*
 * string
 */
"G0JU4ZVPBZK9ASQ2"

PreviousHelper FunctionsNextCookies

Last updated 6 years ago