diff --git a/src/cmd.js b/src/cmd.js index 89dafe2..bb18aea 100644 --- a/src/cmd.js +++ b/src/cmd.js @@ -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 diff --git a/src/utils.js b/src/utils.js index 1ab7f9c..1ec6bf0 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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) => {