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:
13
src/utils.ts
Normal file
13
src/utils.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user