carbon-react
Version:
A library of reusable React components and an interface for easily building user interfaces based on Flux.
17 lines (15 loc) • 388 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* Generates a random guid, useful for creating unique IDs.
*
* @method guid
*/
exports.default = function () {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
};