Skip to content

Commit

Permalink
♻️ refactor: Make exports static.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Dec 21, 2021
1 parent 7e031f5 commit 9d4e44c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/heapsort.js → src/dary.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

export function dary(arity) {
const dary = (arity) => {
/**
* Note that here we reverse the order of the
* comparison operator since when we extract
Expand All @@ -13,7 +13,7 @@ export function dary(arity) {
* and then pop elements from it until it is empty.
*/

const sort = function (compare, a, i, j) {
const sort = (compare, a, i, j) => {
// Construct the max-heap

let k = i + 1;
Expand Down Expand Up @@ -109,4 +109,6 @@ export function dary(arity) {
};

return sort;
}
};

export default dary;
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './heapsort.js';
export {default as dary} from './dary.js';

0 comments on commit 9d4e44c

Please sign in to comment.