Platform: Web JS, imported from https://cdn.jsdelivr.net/npm/nbtify@2.0.0/+esm
When reading NBT data, integers and bytes are expressed as Number() objects instead of numbers. These can only be created with the new Number() constructor and have the following drawbacks:
new Number(2) === 2 is false
typeof new Number(2) is object
- Console debugging is a bit more awkward as they take up more space.
Is this decision intentional? I know this is true for integers and bytes, but I haven't tested other number types.
Thank you for your time and such a useful library!
Platform: Web JS, imported from https://cdn.jsdelivr.net/npm/nbtify@2.0.0/+esm
When reading NBT data, integers and bytes are expressed as
Number()objects instead of numbers. These can only be created with thenew Number()constructor and have the following drawbacks:new Number(2) === 2is falsetypeof new Number(2)isobjectIs this decision intentional? I know this is true for integers and bytes, but I haven't tested other number types.
Thank you for your time and such a useful library!