8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c6c59f commit d4f7b62Copy full SHA for d4f7b62
src/index.js
@@ -4,14 +4,16 @@ import getStyle from './get-style'
4
import hexToRgb from './hex-to-rgb'
5
import hexToRgba from './hex-to-rgba'
6
import rgbToHex from './rgb-to-hex'
7
+import makeUid from './make-uid'
8
9
const utils = {
10
deepObjectsMerge,
11
getColor,
12
getStyle,
13
hexToRgb,
14
hexToRgba,
- rgbToHex
15
+ rgbToHex,
16
+ makeUid
17
}
18
19
export default utils
@@ -22,5 +24,6 @@ export {
22
24
23
25
26
27
28
29
src/make-uid.js
@@ -0,0 +1,5 @@
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)
+ return 'uid-' + key
+}
0 commit comments