export default function uniqueNumber() {
  let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  //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 prefix ? `${prefix}-${date}` : date;
}
uniqueNumber.previous = 0;