hashzeus

0.1.3 • Public • Published

hashzeus

Node.js CI npm GitHub npm collaborators

Generates globally unique eventId based on microservices on a network. This is created as an alternative for Javascript timestamps for identifying service events.

Installation

npm install hashzeus --save

Usage

    var hashZeus = require('hashzeus');
    var demo = new hashZeus()
    console.log(demo.generateHash('zerodha'));
    // zerodha-6dylVZFUl4cP3fH6bKRe.G
    console.log(demo.generateHash('byjus'));
    // byjus-4SFUv0vu06psuKOUYiw18T
    var demo1 = new hashZeus();
    console.log(demo1.generateHash('byjus')); 
    // generates completely different Id from a differnt object.
    // byjus-3s4REK77l2Fsh2hE8EIUGT
 
    var demo2 = new hashZeus();
    id1 = demo2.generateHash();
    // ..........37qqNkj4E24ulWyeuWxpZh
    id2 = demo2.generateHash();
    // ..........77qqNkj4E24ulWyeuWxpZh
    assert(id1 < id2)
    //true

Readme

Keywords

none

Package Sidebar

Install

npm i hashzeus

Weekly Downloads

4

Version

0.1.3

License

MIT

Unpacked Size

5.82 kB

Total Files

7

Last publish

Collaborators

  • jithinqw