Monster.Types. ID

With the id class, sequences of ids can be created. for this purpose, an internal counter is incremented for each prefix. thus, the first id with the prefix myid will be myid1 and the second id myid2. The ids are the same for every call, for example on a web page.

So the ids can also be used for navigation. you just have to take care that the order stays the same.

As of version 1.6.0 there is the new RandomID. this ID class is continuous from now on.

Constructor

new ID(prefix)

Automatic generation of ids

create new id with prefix

Parameters:
NameTypeDescription
prefixstring
Since
  • 1.0.0
License
  • AGPLv3

Methods

toString() → {string}

Returns:
Type: 
string