1.0.0 • Published 6 years ago

big-uuid v1.0.0

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
6 years ago

Build Status Code coverage

big-uuid

Summary

An RFC 4122 conformant UUID generator creating v1, v3, v4, and v5 UUIDs. Depends on the crypto-js package for its usage of MD5 (v3) and SHA (v5) hashing, the big-integer package to prevent precision errors, and nothing else.

Usage

In node, first install the package: npm install --save big-uuid

Then require the package:

const uuid = require('big-uuid');

const v4 = new uuid.UUID();
console.log(v4.id);
// 005e31bc-82a9-4ad8-ce3f-33dce8f03488

const v1 = new uuid.UUID({
  version: 1,
  // Optionally provide your own clockSequenceGetter,
  // nodeIdentifierGetter, and/or timestampGetter.
});

const v3 = new uuid.UUID({
  version: 3,
  /* One of the UUIDs from the standard or one of your making. */
  namespaceId: uuid.NamespaceIds.URL,
  name: 'foobar',
});

const v5 = new uuid.UUID({
  version: 3,
  /* One of the UUIDs from the standard or one of your making. */
  namespaceId: uuid.NamespaceIds.X500,
  name: 'test',
});

In the browser, build the package (with npm run build) or install the package from npm and navigate to node_modules/big-uuid, then copy the dist/browser/index.js file and point the src of a script block to that file.

1.0.0

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago