mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 02:51:51 +00:00
Convert TS to JS
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* This function returns a random identifier.
|
||||
* @returns
|
||||
*/
|
||||
const guidGenerator = () => {
|
||||
const S4 = function () {
|
||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||
};
|
||||
return (
|
||||
S4() +
|
||||
S4() +
|
||||
'-' +
|
||||
S4() +
|
||||
'-' +
|
||||
S4() +
|
||||
'-' +
|
||||
S4() +
|
||||
'-' +
|
||||
S4() +
|
||||
S4() +
|
||||
S4()
|
||||
);
|
||||
};
|
||||
|
||||
export default guidGenerator;
|
||||
Reference in New Issue
Block a user