updated to make index page working

This commit is contained in:
tmshv committed 2019-10-15 00:16:55 +03:00
1 parent 7363d7c0ec
commit 5831275b7a
11 files changed
+160 -149

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
/**
*
* {a: {}, b: {}, ...} -> Map (a: Class, b: Class)
*
* @param Class
* @param object
*/
export function mapOf(Class, object) {
return Object
.entries(object)
.reduce((map, i) => (
map.set(i[0], new Class(i[1]))
), new Map())
}