mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
21 lines
368 B
JavaScript
21 lines
368 B
JavaScript
/** @module uid */
|
|
|
|
/** @protected */
|
|
var uidCounter = 1;
|
|
|
|
/** @protected */
|
|
var uidObjects = {
|
|
/** Root object. */
|
|
root: {}
|
|
};
|
|
|
|
/** Obtain a unique ID. */
|
|
exports.getUid = function getUid() {
|
|
return uidCounter++;
|
|
};
|
|
|
|
/** Associate an object with a unique ID. */
|
|
exports.setObjectForUid = function setObjectForUid(obj, uid) {
|
|
uidObjects[uid] = obj;
|
|
};
|