mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
feat: save files
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import _ from "lodash";
|
||||
export default {
|
||||
arrayToMap(array) {
|
||||
arrayToMap(array: any) {
|
||||
if (!array) {
|
||||
return {};
|
||||
}
|
||||
if (!_.isArray(array)) {
|
||||
return array;
|
||||
}
|
||||
const map = {};
|
||||
const map: any = {};
|
||||
for (const item of array) {
|
||||
if (item.key) {
|
||||
map[item.key] = item;
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
}
|
||||
return map;
|
||||
},
|
||||
mapToArray(map) {
|
||||
mapToArray(map: any) {
|
||||
if (!map) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user