mirror of
https://gitea.com/actions/stale.git
synced 2026-09-01 18:24:24 +00:00
eaf9131fae
- Changed import statements across multiple files to use the .js extension for ES module compatibility. - Refactored test files to utilize jest's unstable_mockModule for mocking core actions. - Removed unnecessary spy instances in tests, replacing them with direct mocked function calls. - Updated TypeScript configuration to target ES2022 and use NodeNext module resolution. - Removed the tsconfig.spec.json file and adjusted the main tsconfig.json to exclude test files.
15 lines
413 B
TypeScript
15 lines
413 B
TypeScript
import deburr from 'lodash.deburr';
|
|
import {CleanLabel} from '../types/clean-label.js';
|
|
|
|
/**
|
|
* @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());
|
|
}
|