setup-maven-cached/node_modules/underscore/cjs/uniqueId.js

10 lines
250 B
JavaScript
Raw Permalink Normal View History

2022-06-28 16:39:30 +08:00
// 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;