js-heapq Python's heap and priority queue library for JavaScript. Parents are js-data-structures and aureooms/js-heap. let { heapify , heappop , heappush , heappushpop , heapreplace , merge , nlargest , nsmallest , } = heapq ; References Python's heapq library.