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