- Generate Token with only letters, numbers or all in one.
- Generate Token to unique ID DOM element.
- Injected a new Token in array.
- Compare Token in a array.
Token.generateDefault(4)
Random Output: xR7S
Token.generateNumbers(4)
Random Output: 4561
Token.generateLetters(4);
Random Output: fdsz
Token.generateID('btn-');
Result: Your DOM id => btn-0
Token.compare(Token.generateDefault(4), array)
Result: Compare all tokenID in a array and generating new tokenID if current token are identical.
Token.injected(array);
Result: Inject an property named (tokenID) in your Object.
Token.uuid();
Result: Random UUID conform to RFC4122
Name | Desc |
---|---|
n | Number |
id_name | String |
items | Object[] |
newToken | function(): string |