Generate Unique Client ID Per Computer – Biri.js

Category: Javascript , Recommended | May 29, 2020
Author: dashersw
Views Total: 174 views
Official Page: Go to website
Last Update: May 29, 2020
License: GPL-3.0

Preview:

Generate Unique Client ID Per Computer – Biri.js

Description:

If you are developing a web application, you might need a unique client ID (public identifier) for a web client.

Biri is a tiny and fast JavaScript library that makes it easy to generate a unique client-side ID based on the MAC address of the computer.

How to use it:

1. Install and import the biri.

# NPM
$ npm install biri --save
const biri = require('biri');

2. Or load the biri.min.js in the document.

<script src="dist/biri.min.js"></script>

3. Generate a unique client ID. Note that Await can be only used in functions marked as async as follows:

const output = async function() {
      const uniqueId = await biri();
      console.log(uniqueId);
}

You Might Be Interested In:


Leave a Reply