@financial-times/n-md5-uuid

Generates a MD5 (version 3) name-based UUID with optional namespace.

Stats

StarsIssuesVersionUpdatedCreatedSize
@financial-times/n-md5-uuid
045.0.0a year ago4 years agoMinified + gzip package size for @financial-times/n-md5-uuid in KB

Readme

n-md5-uuid

CircleCI Coveralls Coverage NPM version

šŸ‘©ā€šŸš€ Generates a MD5 (version 3) name-based UUID with optional namespace.

Use cases

  • Converting an 11 or 13 digit Brightcove video ID to its equivalent content API UUID
  • Converting a Base64 encoded TME tag ID to its equivalent content API UUID

Installation

# install from NPM
$ npm i -S @financial-times/n-md5-uuid

Usage

This module exports a single method which accepts two arguments:

  1. A name
  2. An optional namespace
const uuid = require('@financial-times/n-md5-uuid');

const brightcove = uuid('834961745001');
console.log(brightcove); // 564b8be3-0775-3531-b87b-f6da2272f642 āœ…

const tme = uuid('MTE2-U2VjdGlvbnM=');
console.log(tme); // 38dbd827-fedc-3ebe-919f-e64cf55ea959 āœ…

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.