miktam / sizeof

Get size of a JavaScript object
MIT License
311 stars 45 forks source link

[BUG] sizeOf of circular structure #86

Closed Pavel-Lihtarov closed 1 year ago

Pavel-Lihtarov commented 1 year ago
    const a = {
      prop1: `ssss`,
      b: {}
    };
    a.b = a;
    const sizeOf = sizeof(a);

this code return -1 - it is not correct. In release 1.6.3 it returned 38