]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/linter/code-path-analysis/id-generator.js
2 * @fileoverview A class of identifiers generator for code path segments.
4 * Each rule uses the identifier of code path segments to store additional
5 * information of the code path.
7 * @author Toru Nagashima
12 //------------------------------------------------------------------------------
14 //------------------------------------------------------------------------------
17 * A generator for unique ids.
22 * @param {string} prefix Optional. A prefix of generated ids.
25 this.prefix
= String(prefix
);
31 * @returns {string} A generated id.
34 this.n
= 1 + this.n
| 0;
36 /* istanbul ignore if */
41 return this.prefix
+ this.n
;
45 module
.exports
= IdGenerator
;