0.0.6 • Published 6 years ago

uuid-shorter v0.0.6

Weekly downloads
23
License
-
Repository
-
Last release
6 years ago

Easy short uuid & timeuuid

Install

yarn add uuid-shorter or npm install uuid-shorter

Use:

import { shorter, uuid, decoder } from "uuid-shorter";

const uuid_ = uuid();
console.log(`UUID is ${uuid_}`);

const shortID = shorter(uuid_);
console.log(`shortID is ${shortID}`);

const uuid_from_shortID = decoder(shortID);
console.log(`uuid from shortID is ${uuid_from_shortID}`);

console.log(uuid_ === uuid_from_shortID ? "UUID IS SAME" : "NOT SAME UPS");

Thats it! :)

As well you can test library with test function, but for that you have to install for generate uuid or uuidv4.

yarn add uuid

import { v4, v1 } from "uuid";
import { test } from "uuid-shorter";

const number_of_test = 10000000; // number of tests
test(number_of_test, v4); // v4 is callback for create uuid
0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago