UNPKG
automizy-js
Version:
latest (1.0.0)
1.0.0
Automizy widget collection
developers.automizy.com/automizyjs
automizy-js
/
src
/
functions
/
getUniqueString.js
12 lines
•
318 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
define
([
'automizy/core'
],
function
(
) { $A.
getUniqueString
=
function
(
){
var
str = (
Math
.
random
() +
1
).
toString
(
36
).
substring
(
2
);
if
($.
inArray
(str, $A.
d
.
uniques
) >=
0
){
return
$A.
getUniqueString
(); } $A.
d
.
uniques
.
push
(str);
return
str; } });