mirror of
https://github.com/stCarolas/setup-maven.git
synced 2024-11-27 05:36:09 +08:00
8 lines
237 B
JavaScript
8 lines
237 B
JavaScript
|
// 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;
|
||
|
}
|