File tree 2 files changed +17
-7
lines changed 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,19 @@ import getColor from './get-color'
3
3
import getStyle from './get-style'
4
4
import hexToRgb from './hex-to-rgb'
5
5
import hexToRgba from './hex-to-rgba'
6
- import rgbToHex from './rgb-to-hex'
7
6
import makeUid from './make-uid'
7
+ import pickByKeys from './pick-by-keys'
8
+ import rgbToHex from './rgb-to-hex'
8
9
9
- const utils = {
10
+ const utils = {
10
11
deepObjectsMerge,
11
12
getColor,
12
13
getStyle,
13
14
hexToRgb,
14
15
hexToRgba,
15
- rgbToHex,
16
- makeUid
16
+ makeUid,
17
+ pickByKeys,
18
+ rgbToHex
17
19
}
18
20
19
21
export default utils
@@ -24,6 +26,7 @@ export {
24
26
getStyle ,
25
27
hexToRgb ,
26
28
hexToRgba ,
27
- rgbToHex ,
28
- makeUid
29
- }
29
+ makeUid ,
30
+ pickByKeys ,
31
+ rgbToHex
32
+ }
Original file line number Diff line number Diff line change
1
+ export default pickByKeys = ( originalObject , keys ) => {
2
+ var newObj = { }
3
+ for ( var i = 0 ; i < keys . length ; i ++ ) {
4
+ newObj [ keys [ i ] ] = originalObject [ keys [ i ] ]
5
+ }
6
+ return newObj
7
+ }
You can’t perform that action at this time.
0 commit comments