3

Is there anyway not to write this:

import {replace_in_mtstr, tot_width, rationalize, eval_expression, ascii_to_latex, latex_to_ascii, getIndicesOf, cleanIndices, change_sign, exponentiate, multiply_grouped_nodes, flip_fraction, add_brackets, are_of_type, any_of_type, have_same_ancestors, have_same_type, have_same_text, have_single_factor, have_same_denom, are_same_terms, get_prev, get_next, get_all_next, has_op, parse_mtstr, parse_poly, prepare} from "./functions";

in ES6? These are all the exported functions in a different file. The closes thing I know is import * as object from 'file';. However, I want to have the functions available directly, not inside an object. Is this possible in ES6?

guillefix
  • 331
  • 5
  • 11
  • Not possible… See also [here](http://stackoverflow.com/a/21564110/1048572) and the questions linked there. – Bergi Jul 10 '16 at 15:01
  • 1
    It's not possible. You can do `import functions from "./functions";` and access all those exported functions from `functions` object. – Venky Jul 10 '16 at 18:47
  • Ok then :P. Thanks for letting me know. – guillefix Jul 10 '16 at 18:55

1 Answers1

2

As the comments indicate, this is not possible.

Frank Tan
  • 3,860
  • 2
  • 17
  • 29