Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 805 Bytes

namegenerator.md

File metadata and controls

54 lines (33 loc) · 805 Bytes

rcs.nameGenerator

This is mainly to generate a new name based on the module decimal-to-any

Methods

generate

This will generate a new name

rcs.nameGenerator.generate()

Example:

const rcs = require('rcs-core');
const newName = rcs.nameGenerator.generate();

setAlphabet

Customize the used alphabet

rcs.nameGenerator.setAlphabet(alphabet)

Parameters:

  • alphabet <String>

Example:

const rcs = require('rcs-core');

rcs.nameGenerator.setAlphabet('abcde');

const newName = rcs.nameGenerator.generate(); // 'a'

reset

Starts the alphabet at the first letter

rcs.nameGenerator.reset()

Usage:

const rcs = require('rcs-core');

rcs.nameGenerator.reset();