mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
move guidGenerator to utils to make it more available
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user