Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
/ browser-token.js Public archive

browser-token.js control uuid token for browser and other control token.

Notifications You must be signed in to change notification settings

FoobarIT/browser-token.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features

  • 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.

Docs

Token.generateDefault(n);
Token.generateDefault(4)

Random Output: xR7S

Token.generateNumbers(n);
Token.generateNumbers(4)

Random Output: 4561

Token.generateLetters(n);
Token.generateLetters(4); 

Random Output: fdsz

Token.generateID(id_name);
Token.generateID('btn-');

Result: Your DOM id => btn-0

Token.compare(newToken, items);
Token.compare(Token.generateDefault(4), array)

Result: Compare all tokenID in a array and generating new tokenID if current token are identical.

Token.injected(items);
Token.injected(array);

Result: Inject an property named (tokenID) in your Object.

Token.uuid();
Token.uuid(); 

Result: Random UUID conform to RFC4122

Parameters
Name Desc
n Number
id_name String
items Object[]
newToken function(): string

About

browser-token.js control uuid token for browser and other control token.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published