File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ import getStyle from './get-style'
4
4
import hexToRgb from './hex-to-rgb'
5
5
import hexToRgba from './hex-to-rgba'
6
6
import rgbToHex from './rgb-to-hex'
7
+ import makeUid from './make-uid'
7
8
8
9
const utils = {
9
10
deepObjectsMerge,
10
11
getColor,
11
12
getStyle,
12
13
hexToRgb,
13
14
hexToRgba,
14
- rgbToHex
15
+ rgbToHex,
16
+ makeUid
15
17
}
16
18
17
19
export default utils
@@ -22,5 +24,6 @@ export {
22
24
getStyle ,
23
25
hexToRgb ,
24
26
hexToRgba ,
25
- rgbToHex
27
+ rgbToHex ,
28
+ makeUid
26
29
}
Original file line number Diff line number Diff line change
1
+ //function for UI releted ID assignment, due to one in 10^15 probability of duplication
2
+ export default makeUid = ( ) => {
3
+ const key = Math . random ( ) . toString ( 36 ) . substr ( 2 )
4
+ return 'uid-' + key
5
+ }
You can’t perform that action at this time.
0 commit comments