MetaScript.name #55
Unanswered
ihorozheredov
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MetaScript.name is calculated in readScript function. It depends from option.filename and file's name:
metavm/lib/loader.js
Lines 10 to 14 in 85a4d2c
then in const "scriptOptions" it will be changed to options.filename
metavm/lib/vm.js
Lines 39 to 41 in 85a4d2c
Maybe it would be better to do something like this:
metavm/lib/loader.js
Lines 10 to 13 in 85a4d2c
change to
const name = path.basename(filePath, '.js');
metavm/lib/vm.js
Line 39 in 85a4d2c
change to
this.name = options.filename || name;
Beta Was this translation helpful? Give feedback.
All reactions