move guidGenerator to utils to make it more available

This commit is contained in:
Fabio Pliger
2022-04-22 12:03:04 -05:00
parent 9d0837abec
commit 1be8aa3a28
2 changed files with 9 additions and 9 deletions

View File

@@ -34,4 +34,11 @@ function ltrim(code: string): string {
return code
}
export {addClasses, getLastPath, ltrim, htmlDecode}
function guidGenerator(): string {
var S4 = function(): string {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
};
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}
export {addClasses, getLastPath, ltrim, htmlDecode, guidGenerator}