GithubHelp home page GithubHelp logo

generators's Introduction

@nemodreamer/generators

Commitizen friendly

Procedural generators, for games and fake data.

API

Modules

helpers
random
generators
names

helpers


random


############# random.getRandom ⇒ any Kind: static constant of random
Returns: any - Random element from input array.

Param Type Description
arr [ 'Array' ].<any> Input array.

############# random.getRange ⇒ Number Kind: static constant of random
Returns: Number - A random number between min and max (including).

Param Type
min Number
max Number

############# random.doProbability ⇒ Boolean Kind: static constant of random

Param Type Description
p Number Probability as float between 0-1.

generators


names


############# names.createName(config) ⇒ String Creates a name in a given language.

"Languages" are approximations based on basic combination "rules" of selected vowels/consonants.

Kind: static method of names
Returns: String - A clean, fully (potentially separated/accented) name.

Param Type Default Description
config Object
[config.min] Number 1 Minimum number of syllables.
[config.max] Number 3 Maximum number of syllables.
[config.language] LANGUAGES The language of the name. If not specified, a language will be picked at random.
[config.debug] Boolean Return additional information.

####################### createName.LANGUAGES : LANGUAGES Kind: static property of createName


LANGUAGES : enum

Language of generated name

Kind: global enum
Read only: true
Properties

  • DEFAULT String
  • RANDOM String
  • NORDIC String
  • LATIN String
  • GOBLIN String
  • MOLE String
  • SPIDER String
  • BIBO String

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.