import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
//#region src/v2/features/collection/components/Editor/helpers/get-operation-context.ts
/**
* Returns an OperationContext if both path is provided and method is a valid HTTP method.
* Returns null otherwise.
*/
var getOperationContext = (path, method) => {
	if (!path || !isHttpMethod(method)) return null;
	return {
		path,
		method
	};
};
//#endregion
export { getOperationContext };

//# sourceMappingURL=get-operation-context.js.map