n-md5-uuid
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:
- A name
- 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 ✅