1
0
mirror of https://github.com/actions/labeler synced 2026-05-10 02:51:02 +02:00

Apply suggestions for the beta vesrion and update the documentation

This commit is contained in:
MaksimZhukov
2023-10-31 13:09:20 +01:00
parent efe4c1c90e
commit 9181355e36
12 changed files with 218 additions and 205 deletions

13
src/utils.ts Normal file
View File

@@ -0,0 +1,13 @@
import {Minimatch} from 'minimatch';
export const printPattern = (matcher: Minimatch): string => {
return (matcher.negate ? '!' : '') + matcher.pattern;
};
export const kebabToCamel = (str: string): string => {
return str.replace(/-./g, m => m.toUpperCase()[1]);
};
export function isObject(obj: unknown): obj is object {
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
}