const Random = require('random-js')

const stringLength = 16

const uniqueId = function() {
    const randomEngine = Random.engines.mt19937().autoSeed();
    const randomDistrib = Random.string();

    return randomDistrib(randomEngine, stringLength)
}

module.exports = uniqueId

var Random = require('random-js')

var stringLength = 16

var uniqueId = function() {
    var randomEngine = Random.engines.mt19937().autoSeed();
    var randomDistrib = Random.string();

    return randomDistrib(randomEngine, stringLength)
}

module.exports = uniqueId

Replace const with var (ES5 compatibility)
Replace const with var (ES5 compatibility)
