Skip to content
Generates a random string [0-9][A-Z][a-z]
HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitignore
LICENSE
README.md
bower.json
index.html
random-string.html

README.md

<random-string>

A web component that generates a random string [0-9][A-Z][a-z].

Demo

Check it live!

Install

Install the component using Bower:

Or download as ZIP.

$ bower install random-string --save

Usage

  1. Import polyfill:

    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
  2. Import Custom Element:

    <link rel="import" href="bower_components/random-string/random-string.html">
  3. Start using it!

    <random-string></random-string>

Options

Attribute Options Default Description
length integer 10 The number of characters.

Methods

Method Parameters Returns Description
generate() None. Nothing. Generates a new string.
limit() None. int. The maximum number of characters.

Events

Event Description
lengthChanged Triggers a new string to generate.

History

For detailed changelog, check Releases.

License

MIT License

You can’t perform that action at this time.