I'm searching a way to detect Buffer in Luvit. However this code is not
working:
local instanceof = require('core').instanceof
local Buffer = require('buffer').Buffer
local b = Buffer:new('chunk')
p(b)
-- { ctype = cdata<unsigned char *>: 0x7feda4701bc0, length = 5 }
p(instanceof(b, Buffer))
-- false (WTF?)
Core's instanceof method
(https://luvit.io/api/core.html#core_core_instanceof_obj_class) returns
`false` where it should be true obviously.
--
You received this message because you are subscribed to the Google Groups
"luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.