1.0.1 • Published 9 years ago

related-uuid v1.0.1

Weekly downloads
5
License
MIT
Repository
-
Last release
9 years ago

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

1.0.1

9 years ago

1.0.0

9 years ago