2

I'm aware that the ECMA script spec says that an object can have infinite children however I also understand many ECMA script implementations do not conform to this. I was wondering if node has a limit on the amount of children an object can have?

Thanks, Ed.

Edward Lynch
  • 148
  • 8

1 Answers1

3

Yes it can but until heap out of memory.

var a = {};
var i = 0;
while(true){
    a[i] = null;
    i++;
}

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

So it depends on your memory size.

hurricane
  • 6,521
  • 2
  • 34
  • 44