UNPKG

269 BJavaScriptView Raw
1let id = 0;
2/**
3 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
4 * @param prefix The value to prefix the ID with.
5 */
6export default function uniqueId(prefix = '') {
7 id++;
8 return `${prefix}${id}`;
9}
10//# sourceMappingURL=uniqueId.js.map
\No newline at end of file