related-uuid

1.0.1 • Public • Published

related-uuid

Create a consistent UUID based off another UUID and a key.

When you want to consistently generated UUIDs for related entities from a thing that is addressable by a UUID

  var relatedUUID = require('related-uuid')
 
  // ...
 
  var object = JSON.parse(jsonFromSomeOtherDataSource)
 
  var myRelatedObject = {
    uuid: relatedUUID(object.uuid, 'MyRelatedObject'),
    my: 'thing'
  }

Now every time you load the object from another data source and you return your related object your related object will have a UUID that stays consistent for that loaded object.

Installation

npm install related-uuid

Tests

npm test

MIT Licensed

Readme

Keywords

Package Sidebar

Install

npm i related-uuid

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • robskillington