UNPKG

386 BJavaScriptView Raw
1export const groupKeysMap = keys => {
2 const map = new Map();
3 keys.forEach((key, index) => {
4 map.set(key, index);
5 });
6 return map;
7};
8export const groupDisabledKeysMap = dataSource => {
9 const map = new Map();
10 dataSource.forEach((_ref, index) => {
11 let {
12 disabled,
13 key
14 } = _ref;
15 if (disabled) {
16 map.set(key, index);
17 }
18 });
19 return map;
20};
\No newline at end of file