-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make label comparison case insensitive (#517)
* Make label comparison case insensitive * PR Feedback
- Loading branch information
1 parent
d901397
commit a78d0b7
Showing
4 changed files
with
70 additions
and
108 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import deburr from 'lodash.deburr'; | ||
import { CleanLabel } from '../types/clean-label'; | ||
|
||
/** | ||
* @description | ||
* Clean a label by lowercasing it and deburring it for consistency | ||
* | ||
* @param {string} label A raw GitHub label | ||
* | ||
* @return {string} A lowercased, deburred version of the passed in label | ||
*/ | ||
export function cleanLabel(label: Readonly<string>): CleanLabel { | ||
return deburr(label.toLowerCase()); | ||
} |
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