Skip to content
UUID utility with compact Base64 formatting
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
misc
test
.eslintrc.js
.gitignore
.travis.yml
CHANGELOG.txt
Gruntfile.js
LICENSE
README.md
UUIDTool.js
futoin.json
package.json
yarn.lock

README.md

NPM Version NPM Downloads Build Status stable

NPM

About

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

Installation for Node.js

Command line:

$ npm install futoin-uuid --save

or:

$ yarn add futoin-uuid --save

Examples

const UUIDTool = require('futoin-uuid');

UUIDTool.genBin(); // -> Buffer(16)
UUIDTool.genB64(); // -> String(22)

API documentation

UUIDTool

Common tool for UUID generation and use in transactions

Kind: global class

UUIDTool.genBin() ⇒ Buffer

Generate UUID v4

Kind: static method of UUIDTool
Returns: Buffer - buffer of 16 items

UUIDTool.genB64() ⇒ string

Generate UUID v4 encoded in Base64 without padding

Kind: static method of UUIDTool
Returns: string - 22 characters

You can’t perform that action at this time.