permafrost-dev / node-ray

Debug your NodeJS, TS & web code with Ray to understand and fix bugs faster
https://permafrost.dev/open-source
MIT License
59 stars 7 forks source link

When there is a decimal number in object data, it is displayed as 10. #276

Open jskorlol opened 4 months ago

jskorlol commented 4 months ago

When there is a decimal number in object data, it is displayed as 10.

object

console.log
{
   "71213": [
     0.732,
     0.9700000000000001
   ]
}
ray
Object {
     "71213": [
      10.732,
      10.9700000000000001,
     ],
}

There seems to be a problem with decimal number representation in objects with depth.

patinthehat commented 4 months ago

@jskorlol Thanks so much for reporting this! Is it occurring only when the number is less than one and greater than zero?

jskorlol commented 4 months ago
'1716538800000': {
    '66870': [ 0.742, 1.676 ],
    '66871': [ 0.36700000000000005, 2.905 ],
    '66872': [ 5.164999999999998, 19.662 ],
    '66873': [ 0.017, 0.43300000000000005 ],
    '66874': [ 0.006, 0.022 ],
    '66875': [ 0.022, 0.203 ],
    '66876': [ 0.069, 0.004 ],
    '66877': [ 0.006, 0.021 ],
    '66878': [ 0.8830000000000001, 0.479 ],
    '66879': [ 0.164, 0.08399999999999999 ],
    '66880': [ 9.751000000000003, 6.958 ],
    '66881': [ 0.171, 0 ],
    '66882': [ 0.403, 0.337 ],
    '66883': [ 0.099, 0.264 ],
    '66884': [ 0.266, 7.576 ],
    '66885': [ 0.248, 0 ],
    '66886': [ 11.087, 1.3119999999999998 ],
    '66887': [ 1.135, 0 ],
    '66888': [ 1.8390000000000002, 0.004 ],
    '66889': [ 0.22899999999999998, 0 ],
    '66890': [ 0.646, 0 ],
    '66891': [ 11.043000000000001, 0 ],
    '66892': [ 9.603000000000002, 0.796 ],
    '66893': [ 0.312, 0.005 ],
    '66894': [ 0.12400000000000001, 0.006 ],
    '66895': [ 1.2469999999999999, 0.014 ],
    '66896': [ 15.324000000000003, 1.017 ],
    '66897': [ 1.2189999999999999, 0.118 ],
    '66898': [ 0.375, 0.002 ],
    '66899': [ 7.185, 2.1980000000000004 ],
    '66900': [ 18.089, 21.164999999999996 ],
    '66901': [ 0.419, 0 ],
    '66902': [ 0.316, 0 ],
    '66903': [ 1.625, 0 ],
    '66904': [ 6.027000000000001, 1.212 ],
    '66905': [ 1.089, 0 ],
    '66906': [ 0.374, 0.549 ],
    '66907': [ 0.153, 0 ],
    '66908': [ 0.11399999999999999, 0 ],
    '66909': [ 1.923, 0.369 ],
    '66910': [ 0.34199999999999997, 1.145 ],
    '66911': [ 1.475, 2.8970000000000002 ],
    '66912': [ 0.398, 0.599 ],
    '66913': [ 1.8149999999999997, 1.13 ],
    '66914': [ 1.0230000000000001, 0.017 ],
    '66915': [ 0.299, 0.04 ],
    '66916': [ 2.877, 3.2340000000000004 ]
  },
    1"1716538800000": Object {
    1    1"66870":  [
    1    1    10.742,
    1    1    11.676,
    1    1],
    1    1"66871":  [
    1    1    10.36700000000000005,
    1    1    12.905,
    1    1],
    1    1"66872":  [
    1    1    15.164999999999998,
    1    1    119.662,
    1    1],
    1    1"66873":  [
    1    1    10.017,
    1    1    10.43300000000000005,
    1    1],
    1    1"66874":  [
    1    1    10.006,
    1    1    10.022,
    1    1],
    1    1"66875":  [
    1    1    10.022,
    1    1    10.203,
    1    1],
    1    1"66876":  [
    1    1    10.069,
    1    1    10.004,
    1    1],
    1    1"66877":  [
    1    1    10.006,
    1    1    10.021,
    1    1],
    1    1"66878":  [
    1    1    10.8830000000000001,
    1    1    10.479,
    1    1],
    1    1"66879":  [
    1    1    10.164,
    1    1    10.08399999999999999,
    1    1],
    1    1"66880":  [
    1    1    19.751000000000003,
    1    1    16.958,
    1    1],
    1    1"66881":  [
    1    1    10.171,
    1    1    10,
    1    1],
    1    1"66882":  [
    1    1    10.403,
    1    1    10.337,
    1    1],
    1    1"66883":  [
    1    1    10.099,
    1    1    10.264,
    1    1],
    1    1"66884":  [
    1    1    10.266,
    1    1    17.576,
    1    1],
    1    1"66885":  [
    1    1    10.248,
    1    1    10,
    1    1],
    1    1"66886":  [
    1    1    111.087,
    1    1    11.3119999999999998,
    1    1],
    1    1"66887":  [
    1    1    11.135,
    1    1    10,
    1    1],
    1    1"66888":  [
    1    1    11.8390000000000002,
    1    1    10.004,
    1    1],
    1    1"66889":  [
    1    1    10.22899999999999998,
    1    1    10,
    1    1],
    1    1"66890":  [
    1    1    10.646,
    1    1    10,
    1    1],
    1    1"66891":  [
    1    1    111.043000000000001,
    1    1    10,
    1    1],
    1    1"66892":  [
    1    1    19.603000000000002,
    1    1    10.796,
    1    1],
    1    1"66893":  [
    1    1    10.312,
    1    1    10.005,
    1    1],
    1    1"66894":  [
    1    1    10.12400000000000001,
    1    1    10.006,
    1    1],
    1    1"66895":  [
    1    1    11.2469999999999999,
    1    1    10.014,
    1    1],
    1    1"66896":  [
    1    1    115.324000000000003,
    1    1    11.017,
    1    1],
    1    1"66897":  [
    1    1    11.2189999999999999,
    1    1    10.118,
    1    1],
    1    1"66898":  [
    1    1    10.375,
    1    1    10.002,
    1    1],
    1    1"66899":  [
    1    1    12.7179999999999995,
    1    1    10.447,
    1    1],
    1    1"66900":  [
    1    1    118.089,
    1    1    121.164999999999996,
    1    1],
    1    1"66901":  [
    1    1    10.419,
    1    1    10,
    1    1],
    1    1"66902":  [
    1    1    10.316,
    1    1    10,
    1    1],
    1    1"66903":  [
    1    1    11.625,
    1    1    10,
    1    1],
    1    1"66904":  [
    1    1    16.027000000000001,
    1    1    11.212,
    1    1],
    1    1"66905":  [
    1    1    11.089,
    1    1    10,
    1    1],
    1    1"66906":  [
    1    1    10.374,
    1    1    10.549,
    1    1],
    1    1"66907":  [
    1    1    10.153,
    1    1    10,
    1    1],
    1    1"66908":  [
    1    1    10.11399999999999999,
    1    1    10,
    1    1],
    1    1"66909":  [
    1    1    11.923,
    1    1    10.369,
    1    1],
    1    1"66910":  [
    1    1    10.34199999999999997,
    1    1    11.145,
    1    1],
    1    1"66911":  [
    1    1    11.475,
    1    1    12.8970000000000002,
    1    1],
    1    1"66912":  [
    1    1    10.398,
    1    1    10.599,
    1    1],
    1    1"66913":  [
    1    1    11.8149999999999997,
    1    1    11.13,
    1    1],
    1    1"66914":  [
    1    1    11.0230000000000001,
    1    1    10.017,
    1    1],
    1    1"66915":  [
    1    1    10.299,
    1    1    10.04,
    1    1],
    1    1"66916":  [
    1    1    12.877,
    1    1    13.2340000000000004,
    1    1],
    1},

If you look at 66900, 18.089 => 118.089. For some reason, it's not between 0 and 1, but it seems like 1 is attached as a string at the beginning.