如何用console.log编写js_of_ocaml?print_endline可能会转到控制台,但我想要访问跟踪、错误等。我可以将console定义为外部对象吗?
这对我不起作用:
let console = Js.Unsafe.global##console
在以下方面失败:
TypeError: N.console不是函数test.js:255:30
如果出现同样的错误,则会失败:
class type console = object
method log : Js.js_string Js.t -> unit Js.meth
end
let _ =
let co
当我使用JSON.dump()时,我的格式低于JSON格式
Dumps data"b'{\"AutomaticReadabilityIndex\":2.7999999999999994,\"AgeLevel\":[\" 11 to 12\"],\"Statement\":[\"Nice. Your grade is about six\"],\"SpacheScore\":1.877,\"GunningFogScore\":9.099999999999998,\
node s3_listbuckets.js
Error TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Authorization"]
at ClientRequest.setHeader (_http_outgoing.js:470:3)
at new ClientRequest (_http_client.js:219:14)
at Object.request (https.js:305:10)
at features.constructor.hand