Implementation of Timsort sorting algorithm for nodejs