Closed halloleo closed 3 years ago
Yes, is a Bug.
We need more testers, if you can test as much as you can of the functions and report the bugs would be cool.
Node documentation does not mention any type at all, that makes hard to determine the return types and argument types.
Thanks @juancarlospaco for the super-prompt fix! I updated to HEAD and it works perfectly. :smile:
We need more testers, if you can test as much as you can of the functions and report the bugs would be cool.
I certainly will test other functions in your package.
Node documentation does not mention any type at all, that makes hard to determine the return types and argument types.
Well, JavaScript is not TypeScript...
I certainly will test other functions in your package.
So you get to test other stuff?, it worked in the end?. :slightly_smiling_face:
Just coming back to this: Yes, it worked at the end:
For purely text files your fix does the job perfectly. With binary data however I had trouble using the toString conversion when passing the content further to another JavaScriptmodule.
I'm now reading the file as an ArrayBuffer and use then for text content an explicit converter function like this:
func arraybuffer2cstring(buf: cstring): cstring {.importjs: """
new TextDecoder("utf-8").decode(#)
""".}
## Convert an ArrayBuffer to a JS String
I'm trying nodejs/jsfs and get a node runtime error "TypeError: c_1455079.charCodeAt is not a function".
Here my little program
read_try.nim
:and I compile it with
Does this maybe means, node cannot find the file
sometext.txt
? But sounds weird to me.