mirror of
https://github.com/actions/labeler.git
synced 2025-12-11 12:07:32 +00:00
14 lines
404 B
TypeScript
14 lines
404 B
TypeScript
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);
|
|
}
|