You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the output:
maliang@bogon ~/tmp/x/mjs$ ./exec 1.js
[object Object]
maliang@bogon ~/tmp/x/mjs$ ./exec 2.js
invalid JSON string
undefined
When I use cc mjs.c -DMJS_MAIN -D_DARWIN_C_SOURCE -o mjsexec, and the later js work ok when it is the command parameter
maliang@bogon ~/tmp/x/mjs$ ./mjsexec -e "let x = '{"a":1,"b":1,"c":1,"d":1,"e":1,"f":1,"g":1,"h":1,"i":1,"j":1,"k":1,"l":1,"m":1,"n":1,"o":1,"p":1,"q":1,"r":1,"s":1,"t":1, "u":1,"v":1}'; let xo = JSON.parse(x)"
[object Object]
The text was updated successfully, but these errors were encountered:
As mentioned on title, tested under osx and x86_64 linux.
Here is my exe.c
And there are two js file: 1.js, 2.js
Here is the output:
maliang@bogon ~/tmp/x/mjs$ ./exec 1.js
[object Object]
maliang@bogon ~/tmp/x/mjs$ ./exec 2.js
invalid JSON string
undefined
When I use cc mjs.c -DMJS_MAIN -D_DARWIN_C_SOURCE -o mjsexec, and the later js work ok when it is the command parameter
maliang@bogon ~/tmp/x/mjs$ ./mjsexec -e "let x = '{"a":1,"b":1,"c":1,"d":1,"e":1,"f":1,"g":1,"h":1,"i":1,"j":1,"k":1,"l":1,"m":1,"n":1,"o":1,"p":1,"q":1,"r":1,"s":1,"t":1, "u":1,"v":1}'; let xo = JSON.parse(x)"
[object Object]
The text was updated successfully, but these errors were encountered: