A primitive wrapper of uuid package for UUID v4 generation with Base64 encoding.
The reason is to get a universal and short UUID representation in printable characters which can be efficiently used in JSON and databases without special UUID type.
It produces only 22 characters instead of canonical 36 hexdecimal chars with separators.
Documentation --> FutoIn Guide
Author: Andrey Galkin
Command line:
$ npm install futoin-uuid --save
or:
$ yarn add futoin-uuid --save
const UUIDTool = require('futoin-uuid');
UUIDTool.genBin(); // -> Buffer(16)
UUIDTool.genB64(); // -> String(22)
Common tool for UUID generation and use in transactions
Kind: global class
Generate UUID v4
Kind: static method of UUIDTool
Returns: Buffer
- buffer of 16 items
Generate UUID v4 encoded in Base64 without padding
Kind: static method of UUIDTool
Returns: string
- 22 characters