short-uuid
![Dependencies](https://david-dm.org/oculus42/short-uuid.svg)
Generate and translate standard UUIDs into shorter - or just different - formats and back.
v2.3.3
short-uuid provides RFC4122 v4-compliant UUIDs,
thanks to uuid
.
It includes Browserify support for client-side use as proposed by voronianski,
with compiled browser-ready files in the npm package for convenience. The library is exposed as ShortUUID
.
2.3.0 corrects Snyk vulnerability protection to a dev dependency.
2.3.1 merges the 2.1.x fixes into version history.
2.3.2 merges a TypeScript definition from alexturek.
2.3.3 fixes missing /dist folder from the npm module.
v2.2.0 Deprecated
2.2.0 incorrectly added Snyk as a production dependency. It has been deprecated.
var short = require('short-uuid');
var translator = short();
var decimalTranslator = short("0123456789");
var cookieTranslator = short(short.constants.cookieBase90);
translator.new();
short.uuid();
translator.uuid();
translator.toUUID(shortId);
translator.fromUUID(regularUUID);
translator.alphabet
short.constants.flickrBase58;
short.constants.cookieBase90;
short-uuid is under 1K when compressed. Using Browserify, the library and dependencies are ~3.2K.
Please see Revisions for information on previous versions.