Autobinx property for Histogram graphs in R?

I’m using autobinx property to draw the bins in the histogram and the width of these bins with represents the intervals are calculated automatically my question is how this intervals calculated ?

The calculations for autobinx happen on the JavaScript side. See lines which then call these lines where most of the magic happens.