gasilboxes.blogg.se

Uuid generator npm
Uuid generator npm




uuid generator npm

New TokenGenerator( 512, TokenGenerator.BASE62)

uuid generator npm

New TokenGenerator(TokenGenerator.BASE36) One of the TokenGenerator.BASE# constants or a custom string of characters to use to encode the token. The size of the token to generate in bits. -> '圆GCX3aq9hIT8gjhvO96ObYj0W5HBVTsj64eqCuVc5X' API new TokenGenerator() ⇒ ObjectĬreates a new TokenGenerator instance that generates bitSize-bit tokens encoded using the characters in baseEncoding. -> '4QhmRwHwwrgFqXULXNtx4d' const tokgen2 = new TokenGenerator( 256, TokenGenerator.BASE62) Usage const TokenGenerator = require( 'uuid-token-generator') Ĭonst tokgen = new TokenGenerator() // Default is a 128-bit token encoded in base58

Uuid generator npm install#

Installation npm install uuid-token-generator -save It is less likely to produce colliding tokens.It has both a synchronous and asynchronous interface.You can specify the length of the token that you'd like to generate It has more flexible token generation options.This package is no longer being maintained because a better one exists- uid-generator-which is better for the following reasons: Great for generating things like API keys and compact UIDs. Generated tokens are strings that are guaranteed to always be the same length, depending on the bit-size specified for the token. Provides a class that generates random tokens with custom size and base-encoding using the RFC 4122 v4 UUID algorithm.






Uuid generator npm