Entire content import on combination of exports in JavaScript

With a combination of exports, you can import a default function and all other functions as an object.

Let's see how it's done. Let's say we have the following exports:

src/test.jsexport function func1() {
  return '1'
}
export function func2() {
  return '2'
}
export default function() {
  return 'text';
};

We import a default function and all other functions named mod:

src/index.jsimport test, * as mod from './test.js';

Let's check the default function:

src/index.jslet res = test();
console.log(res);

And other functions:

src/index.jslet res1 = mod.func1();
let res2 = mod.func2();

console.log(res1, res2);
Задание 1

Create a module that exports one default function and a few more functions as an object with functions.