Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39697 > unrolled thread
| Started by | Anton Shepelev <anton.txt@g{oogle}mail.com> |
|---|---|
| First post | 2021-03-18 16:36 +0300 |
| Last post | 2021-03-18 20:19 +0300 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.javascript
Exposing a module in the current scope Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-03-18 16:36 +0300
Re: Exposing a module in the current scope Anton Shepelev <antonius@freeshell.de> - 2021-03-18 20:19 +0300
| From | Anton Shepelev <anton.txt@g{oogle}mail.com> |
|---|---|
| Date | 2021-03-18 16:36 +0300 |
| Subject | Exposing a module in the current scope |
| Message-ID | <20210318163634.65c3c5215c7a68c6a9fcef58@g{oogle}mail.com> |
Hello, all
It looks like in the system for which I need to write
server-side JavaScript, neither CommonJS nor ECMAScript
modules are supported, but it provides its own module system
that works as shown below:
$.import("anton_test/util.xsjslib","util"); // import module
$.anton_test.util.log("Log from library."); // invoke a function
Is it somehow possible to have all the functions from `util'
available in the current scope, so that I could invoke them
by their names: log("Hello"), rather than, say,
util.log("Hello")?
--
() ascii ribbon campaign - against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]
[toc] | [next] | [standalone]
| From | Anton Shepelev <antonius@freeshell.de> |
|---|---|
| Date | 2021-03-18 20:19 +0300 |
| Message-ID | <20210318201942.21eb645f138cc314ce65e5de@freeshell.de> |
| In reply to | #39697 |
I am sorry for the triple post. My NNTP-server stopped sending messages to groups, so I tried it several times. -- () ascii ribbon campaign - against html e-mail /\ http://preview.tinyurl.com/qcy6mjc [archived]
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web