EOSBlox / blox-random

Generates a random string or number of a specified length

Home Page:https://www.eosblox.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<blox-random>

Build Status

Generates a random string or number of a specified length

Install the Polymer-CLI

First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.

Install blox-randomt

$ npm install blox-random

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Import

$ import 'blox-random';

Basic Use

<blox-random
    length="20"
    type="number"
    result="{{result}}">
</blox-random>

Javascript Generate Number

<blox-random id="bloxRandom"></blox-random>
<script>
    this.$.bloxRandom.generateNumber(10)
    .then((num) => {
        // Do Something
    })
    .catch((err) => {
        // Do Something
    })
</script>

Javascript Generate String

<blox-random id="bloxRandom"></blox-random>
<script>
    this.$.bloxRandom.generateString(10)
    .then((str) => {
        // Do Something
    })
    .catch((err) => {
        // Do Something
    })
</script>

About

Generates a random string or number of a specified length

https://www.eosblox.com

License:MIT License


Languages

Language:HTML 58.0%Language:JavaScript 42.0%