UNPKG

swagger-client

Version:

SwaggerJS - a collection of interfaces for OAI specs

7 lines (6 loc) 271 B
import eachOperation from './each-operation.js'; // Will stop iterating over the operations and return the operationObj // as soon as predicate returns true export default function findOperation(spec, predicate) { return eachOperation(spec, predicate, true) || null; }