No Description

uniqueId.js 237B

1234567
  1. // Generate a unique integer id (unique within the entire client session).
  2. // Useful for temporary DOM ids.
  3. var idCounter = 0;
  4. export default function uniqueId(prefix) {
  5. var id = ++idCounter + '';
  6. return prefix ? prefix + id : id;
  7. }