UNPKG

axios-mock-server

Version:
28 lines 949 B
"use strict"; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = (function (method, relativePath, handlersSet) { if (method === void 0) { method = ''; } var handlers = handlersSet[method.toLowerCase()]; if (handlers) return handlers.find(function (_a) { var _b = __read(_a, 1), regPath = _b[0]; return regPath.test(relativePath); }); }); //# sourceMappingURL=findHandler.js.map