-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(compare): update deps, use new Fn types
- Loading branch information
1 parent
424f516
commit c3a4b97
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import type { FnN2 } from "@thi.ng/api"; | ||
|
||
/** | ||
* Numeric comparator (ascending order) | ||
* | ||
* @param a - | ||
* @param b - | ||
*/ | ||
export const compareNumAsc = (a: number, b: number) => a - b; | ||
export const compareNumAsc: FnN2 = (a, b) => a - b; | ||
|
||
/** | ||
* Numeric comparator (descending order) | ||
* | ||
* @param a - | ||
* @param b - | ||
*/ | ||
export const compareNumDesc = (a: number, b: number) => b - a; | ||
export const compareNumDesc: FnN2 = (a, b) => b - a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters