@symblight/react-stockcharts
Version:
Highly customizable stock charts with ReactJS and d3
23 lines (18 loc) • 460 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = uniqueId;
var idCounter = {};
function uniqueId() {
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '$unique$';
if (!idCounter[prefix]) {
idCounter[prefix] = 0;
}
var id = ++idCounter[prefix];
if (prefix === '$unique$') {
return '' + id;
}
return '' + prefix + id;
}
//# sourceMappingURL=uniqueId.js.map