Skip to content

Commit 9d4e44c

Browse files
♻️ refactor: Make exports static.
1 parent 7e031f5 commit 9d4e44c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/heapsort.js renamed to src/dary.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

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

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

1919
let k = i + 1;
@@ -109,4 +109,6 @@ export function dary(arity) {
109109
};
110110

111111
return sort;
112-
}
112+
};
113+
114+
export default dary;

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './heapsort.js';
1+
export {default as dary} from './dary.js';

0 commit comments

Comments
 (0)