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