"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = uniqueNumber;

function uniqueNumber() {
  //let randomId = (Date.now() + Math.random()).toString(36);
  var date = Date.now(); // If created at same millisecond as previous

  if (date <= uniqueNumber.previous) {
    date = ++uniqueNumber.previous;
  } else {
    uniqueNumber.previous = date;
  }

  return date;
}

uniqueNumber.previous = 0;