JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q40817F
  • License Apache-2.0

UUID utility with compact Base64 formatting

Package Exports

  • futoin-uuid
  • futoin-uuid/UUIDTool.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (futoin-uuid) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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