show all imports in import statement

This commit is contained in:
Dmitry Vasilev
2023-06-09 16:22:11 +03:00
parent 7b35231355
commit 178d13d3a5
2 changed files with 2 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import {map_object, filter_object, pick_keys, collect_nodes_with_parents, uniq}
import {map_object, filter_object, collect_nodes_with_parents, uniq}
from './utils.js'
import {
is_eq, is_child, ancestry, ancestry_inc, map_tree,
@@ -718,10 +718,7 @@ const get_value_explorer = (state, index) => {
} else if(stmt.type == 'import'){
result = {
ok: true,
value: pick_keys(
state.modules[stmt.full_import_path],
stmt.imports.map(i => i.value)
),
value: state.modules[stmt.full_import_path],
}
} else if (stmt.type == 'export') {
result = stmt.children[0].children[1].result

View File

@@ -41,12 +41,6 @@ export const map_find = (arr, mapper) => arr.reduce(
null
)
export const pick_keys = (obj, keys) => {
return Object.fromEntries(
Object.entries(obj).filter(([k,v]) => keys.includes(k))
)
}
export const stringify = val => JSON.stringify(val, null, 2)
export const zip = (x,y) => {